Forum Moderators: not2easy
#sidebar ul li a {
border-bottom: 1px solid #ccc;
color: #F37134;
display: block;
text-decoration: none !important;
margin: 0px;
padding-top: 4px;
padding-right: 0px;
padding-bottom: 4px;
padding-left: 25px;
background-image: url(images/navbulle.png);
background-repeat: no-repeat;
background-position: 10px 50%;
}
The problem with this is when I view it in IE6 there's a huge horizontal gap at the top of the all the menu items - in all other browsers it's absolutely fine.
I've tried removing the display: block element and everything is lined up correctly so I know that that's the problem. What I don't know is how to resolve the issue.
Any help would be very much appreciated.
It's far safer to use conditional comments IMHO. That way the code to make a specific IE version work is hidden in a comment and far better documented to any future maintenance.
See e.g.:
[webmasterworld.com...]
I use it e.g. as follows:
<!DOCTYPE ...
<html ...
<head>
<title>title</title>
<link rel="stylesheet" type="text/css" href="/style/style.css" />
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="/style/ie6.css" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="/style/ie7.css" />
<![endif]-->
...
The style.css is applied to all browsers (and developed only looking at FF, safari and opera). The ie6.css and ie7.css files are added to it on top of the standards file (sometimes they can be large). They include the workarounds to the stuff the specific version of IE does wrong, without any worry from my end on what it might do to other browsers (saving time and probably more importantly: frustration).