CSS / Mozilla question

Associate
Joined
19 Oct 2002
Posts
206
Location
Oop north - where it's grim...
Hi All

I'm having problems with my <a> tags (I think) in Mozilla (FF 1.5): The following CSS:

Code:
#anchorcar {
	 width: 80px;
	 height: 40px;
	 background-color: blue;
}

And HTML:
Code:
<div>
  <a href="foo.html" id="anchorcar"></a>
</div>

Works fine in IE7 (I get a blue box), but in FF i get nothing - if I put text in the <a> tags, I get a blue background under the text (i.e. it "streches" behind the text).

Can someone help me out, as I'm sure I'm missing something obvious now!

TIA

Si.
 
I'm going to pick your brains again, if that's OK:

If I want to align the link (i.e. the link "box") centrally in relation to the container (the "navigation" div in the example above), how do I do this?

The vertical-align: middle property doesn't work (think I read it doesn't work in IE). Is there another way to do it, other than using top padding?
 
I suspected padding would be the way to go (container is fixed height - or at least it can be).

Cheers for all the help! :)
 
Back
Top Bottom