Forum Moderators: not2easy
<style type="text/css">
#links{background:#B9CAFF;float:left;width:200px}#links ul {margin:0;padding:0;list-style-type:none;width:200px;}
#links li {border: 1px dotted #999;border-width: 1px 0;margin:5px 0;}
#links li a {color: #990000;display: block;font: bold 120% Arial, Helvetica, sans-serif;padding: 5px;text-decoration: none;}
* html #links li a { /* ie hack */
width: 200px;margin: 0;padding: 0;}
#links li a:hover {background: #ffffcc;}
#links a em {color: #333;display: block;font: normal 85% Verdana, Helvetica, sans-serif;line-height: 125%}
#links a span {color: #125F15;font: normal 70% Verdana, Helvetica, sans-serif;line-height: 150%;}
</style>
</head>
<body>
<div id="links">
<ul>
<li><a href="#" title="About Me">About Me
<em>Who am I?</em></a></li>
</ul>
</div>
im having trouble figuring out how to make the spacing come out correct in IE6. in FF/Opera, the spacing is fine in the link, but on IE6, there is no spacing, and any padding or margin would mess up the float alignment.
lis to display inline. You don't seem to have any overlapping properties from anchor to
li, so I thought maybe you could combine them: #links li { [b]display: inline;[/b] }
#links li a { [b]border: dotted #999;
border-width: 1px 0;
margin: 5px 0;[/b]
color: #990000;
display: block;
font: bold 120% Arial, Helvetica, sans-serif;
padding: 5px;
text-decoration: none; } (My changes are in bold, though they're a bit hard to notice :D I wish we could change the colour somehow...)
thanks again
[edited by: SuzyUK at 9:27 am (utc) on Mar. 9, 2007]
[edit reason] please no URI's or image links thanks [/edit]
As to indenting, you could increase the horizontal padding, so where it says "
padding: 5px;" you could replace it with: padding: 5px 10px; .. or however much space you want.
Now, the reason none of this padding is showing up in IE 6 is probably a little more confusing. It's because of this:
* html #links li a { /* ie hack */
width: 200px;margin: 0;padding: 0;} I'm guessing the width is to trigger hasLayout, which allows an anchor to be a greater clickable area (what displaying as block is meant to do.)
I'm not so sure why you're removing margin and padding just for IE though...
Remove it and see if that breaks anything?