Forum Moderators: not2easy
I have the following:
p#breadcrumbs { margin: 5px 0; padding: 1px 0; line-height: 15px;}
p#breadcrumbs span { background: url(../images/bread.gif) bottom right transparent;
padding: 3px 35px 5px 20px; }
-----------
<p id="breadcrumbs"><span><a href="#">home</a></span></p>
The breadcrumbs <p> is within several nested <div>s, one of which has a blue background image. The background image on the <span> element covers this where the breadcrumbs are. What's happening is I'm getting strange 1px thin horizontal blue lines above the links when they're hovered. So the blue background on the containing div is showing through the background image on the <span> element. Can I do anything about this?
p#breadcrumbs { margin: 5px 0; padding: 1px 0; line-height: 15px;}
I won't say I'm positive, but I suspect that if you got rid of that 1px padding, the 'blue line' would disappear. If you need more vertical space around the text in that <p>aragraph, try increasing the line-height, instead. The default setting for vertical-align (which vertically positions content within an inline box) is center, so a 17px line-height would give you the same result as 15px line-height plus 1px top and bottom padding. It would also make the :hover background fill the whole line box.
<p><span><a href="#">home</a><span id="last_item">this page</span></p>
Just saw your post - no removing the 1px didn't help.
By the way, I'm trying to get a long thin horizontal box, that expands horizontally as the breadcrumb trail gets longer. And the right side of it has a rounded corner (hence the background image). So I'm using <span>s so that the box is only as wide as its contents. As far as I can see I couldn't use a black-level element. Is this a sensible approach?