well when trying to validate i get this error. …eader"><div id="logo"><a href="#"><img src="logo.gif"></a></div></div></div> ✉ The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element. Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>. now im guessing it's not likeing me putting a image as a link, i tried doing /> but it didn't work anyone got any ideas ?
What type of validation are you going for? Transistional, Strict etc? I know that sometimes they are funny about img tags, and that they need to have an 'alt' parameter (although I think that may only be strict XHTML). You can leave the parameter blank though, so it would look like: …eader"><div id="logo"><a href="#"><img src="logo.gif" alt="" /></a></div></div></div> Hope that helps! Dan
hey im just doing it locally at the moment, heres the source only tiny at the moment. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> <STYLE TYPE="text/css"> body { background: url(back.gif) repeat-x #525354; padding: 0px; margin: 0px; text-align: center; display: center; } #container { width: 760px; height: 460px; margin: 0px auto; margin: 0px auto; } #logo { float: left; background: url(logo.gif); } #logo a { border: 0px; text-decoration: none; } img { border: 0px; } </style> <!--[if IE]> <style type="text/css"> #container{ height:100px; } </style> <![endif]--> </HEAD> <BODY> <div id="container"> <div id="header"><div id="logo"><a href="#"><img src="logo.gif"></a></div></div></div> </BODY> </HTML> HTML:
</style><![endif]--></HEAD> That might be your problem, it should be </style> <!--[endif]--> </HEAD> I think thats right
This seems to work fine for me: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> <STYLE TYPE="text/css"> body { background: url(back.gif) repeat-x #525354; padding: 0px; margin: 0px; text-align: center; display: center;} #container { width: 760px; height: 460px; margin: 0px auto; margin: 0px auto;} #logo {float: left;background: url(logo.gif); } #logo a {border: 0px; text-decoration: none; } img {border: 0px; } </style> </HEAD> <BODY> <div id="container"> <div id="header"> <div id="logo"> <a href="#"><img src="logo.gif" alt="" /></a></div> </div> </div> </BODY></HTML> Code (markup): Did you add the alt and / tag before?