Doc types do change the way the html and css is rendered. I'd recommend putting a surrounding container like a div or a span and set the width on that. it's uncommon to set the width of the anchor. Joel Thoms DiscountASP.NET http://www.DiscountASP.NET
This is my page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <style type="text/css"> a.text: link, a.text: visited { width: 150px; background-color: #CCCCCC; } a.text: hover { width: 150px; background-color: #CCCCCC; } </style> </head> <a href="#" class="text">Test Link</a> </body> </html> Problem is, the "width" does not work. But if I take out "<DOCTYPE...>", it will work. Is there anything wrong with my CSS code?