CSS Border Problem in Firefox!!??

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
seodevhead
Forum Regular
Posts: 705
Joined: Sat Oct 08, 2005 8:18 pm
Location: Windermere, FL

CSS Border Problem in Firefox!!??

Post by seodevhead »

I am trying to display a banner image that is linked with some simple styling.

Code: Select all

<div id="advert">
<a href="#"><img src="banner.gif" /></a>
</div>
I use CSS just to add some nice border styling and some slight margins.

Code: Select all

div#advert a {
margin: 7px 0px 7px 10px;
border: 1px solid #000;
}

div#advert a img {
border: 2px solid #FFFFFF;
}
Thing is... it is working perfectly in IE6, but is messing up in Firefox. In Firefox, the border on <a> is not surrounding the banner ad, but rather is hidden behind the bottom third of the banner ad. Just to let you all know, I have plenty of room within my current div block, so no probs there. Any idea why the <a> is not surrounding the <img> in Firefox? Thanks guys.
Post Reply