Agustine Posted March 11, 2006 Share Posted March 11, 2006 Element type "img" must be followed by either attribute specifications, ">" or "/>".I passed my XHTML validation now it is time to pass my CSS validation. I only have one mistake with my CSS and I don't understand what it is telling me. Here is the code...<a href="contact.html"><img id="contact2" src="Images/contact.png"onmouseover='document.getElementById("contact2").src="Images/contact2.png"'onmouseout='document.getElementById("contact2").src="Images/contact.png"' border="0" alt="Contact Lenses" /> Thanks Link to comment Share on other sites More sharing options...
Verminox Posted March 12, 2006 Share Posted March 12, 2006 Firstly, I don't see where CSS comes into play here... looks like HTML to me.Secondly, just a tip.... instead of writing the whole document.getElementById thing, you can just refer to the same element as "this".For example, <a href="contact.html"><img id="contact2" src="Images/contact.png"onmouseover='this.src="Images/contact2.png"'onmouseout='this.src="Images/contact.png"' border="0" alt="Contact Lenses" /> Link to comment Share on other sites More sharing options...
raimo Posted March 12, 2006 Share Posted March 12, 2006 I passed my XHTML validation now it is time to pass my CSS validation. I only have one mistake with my CSS and I don't understand what it is telling me. Here is the code...<a href="contact.html"><img id="contact2" src="Images/contact.png"onmouseover='document.getElementById("contact2").src="Images/contact2.png"'onmouseout='document.getElementById("contact2").src="Images/contact.png"' border="0" alt="Contact Lenses" /> ThanksĀ <{POST_SNAPBACK}> You are being messed with those small ' and " marks :)Should (must) be as:<xx dosome="doIt('string', 'other string');" dosomeother="kimis.car.color = 'silver';"></xx>I think, here is fixed version:<img id="contact2" src="images/contact.png" onMouseover="document.getElementById('contact2').src = 'images/contact2.png';" onMouseout="document.getElementById('contact2').src = 'images/contact.png';" border="0" alt="Contact Lenses" /> Link to comment Share on other sites More sharing options...
Agustine Posted March 12, 2006 Author Share Posted March 12, 2006 Ya well when I went to do a CSS validation it came up with that line as an error so I don't really know thats why aI asked... Anyways I will try that out thanks Link to comment Share on other sites More sharing options...
Err Posted March 14, 2006 Share Posted March 14, 2006 I think you need to change the border="0" to style="border:0px" so it would look something like this: <a href="contact.html"><img id="contact2" src="Images/contact.png"onmouseover='document.getElementById("contact2").src="Images/contact2.png"'onmouseout='document.getElementById("contact2").src="Images/contact.png"' style="border:0px" alt="Contact Lenses" /></a> Link to comment Share on other sites More sharing options...
Agustine Posted March 14, 2006 Author Share Posted March 14, 2006 You guys are so nice.Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now