Link Width Problem

liunx

Guest
I am having trouble setting the width & height of a link with CSS in XHTML. The CSS: ul.menu a {width:100px; height:20px;} works fine until I add the doctype to the document. Then the width & height are totally disregarded by IE, Firefox, and Opera. Does anyone know why that might be? I didn't define a width or height anywhere else in the CSS or HTML.

Edit: The CSS and HTML validate (After I put in the doctype)An anchor is inline, which doesn't have dimensions like that.Try adding display:block to make the anchor tag a block tag instead of an inline tag in this situation.
 
Back
Top