PDA

Click to See Complete Forum and Search --> : CSS tabs help


pdawg420
03-22-2008, 07:27 PM
I'm trying to create curved corners on tabs in my navigation. When I preview them in firefox they look perfet however when I view them in IE they don't look wuit right. I know this has something to do with the a bug an IE but I don't know how to fix it. Can anyone help?

.................................................. .................


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
#nav {background: #FFFFFF; padding: 5px 10px 2px; margin: 0;
list-style: none; font: bold 0.8em Verdana, sans-serif;}
#nav li {display: inline; padding: 2px 0 2px 10px;
background: #e68200 url(topleft.gif) top left no-repeat;}
#nav li a {padding: 2px 10px 2px 0; text-decoration: none;
background: url(topright.gif) top right no-repeat;}
#nav li a:link {color: black;}
#nav li a:visited {color: gray;}
</style>
</head>
<body>
<ul id="nav">
<li><a href="index.html">Main</a></li>
<li><a href="home.html">Home</a></li>
<li><a href="away.html">Away</a></li>
</ul>
</body>
</html>

shalom_m
03-22-2008, 08:48 PM
Explorer puts the padding INSIDE the width, FF rightly OUTSIDE.

To solve your problem either try not to use padding or use the HACK.

See:

http://www.yourhtmlsource.com/stylesheets/cssspacing.html

http://www.456bereastreet.com/archive/200612/internet_explorer_and_the_css_box_model/

http://webdesign.about.com/od/css/a/aaboxmodelhack.htm

http://www.webcredible.co.uk/user-friendly-resources/css/hacks-browser-detection.shtml


ADMIN: I have answered this question a number of times, I think it is time to make it a sticky.