Imoddedu Posted August 10, 2009 Report Share Posted August 10, 2009 I've ran this code through the validator MANY time and it seems fine. I think it has something to do with the alt attributes. Whenever I take them out the images are not visible (Only about and Work). Whenever I put in something for alt that is all it shows on the screen. Here is the code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml"><head><title>**************</title><meta name="Keywords" content="***********" /><meta name="Description" content="****************" /><meta http-equiv="Content-type" content="text/html;charset=UTF-8" /><link rel="stylesheet" type="text/css" href="style.css" /><script language="javascript" type="text/javascript">image1 = new Image();image1.src = "images/about.jpeg";image2 = new Image();image2.src = "images/work.jpeg";</script></head><body><img src="images/bg.png" width="100%" height="100%" id="bg" /><table align="center"><tr><td><img src="images/logo.png" alt="logo" /><br /></td></tr></table><div id="buttons"><center><a href="about.xhtml" onmouseover="image1.src='images/about2.jpeg';"onmouseout="image1.src='images/about.jpeg';"><img name="image1" src="images/about.jpeg" border="0" alt="About"/></a><a href="work.xhtml" onmouseover="image2.src='images/work2.jpeg';"onmouseout="image2.src='images/work.jpeg';"><img name="image2" src="images/work.jpeg" border="0" alt="Work"/></a></center></div></body></html> Link to comment Share on other sites More sharing options...
chibineku Posted August 10, 2009 Report Share Posted August 10, 2009 I don't understand the idea behind the JavaScript, cause it isn't doing anything... Link to comment Share on other sites More sharing options...
Imoddedu Posted August 10, 2009 Author Report Share Posted August 10, 2009 Isn't it doing the rollovers? Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted August 10, 2009 Report Share Posted August 10, 2009 No, it's doing nothing, and unless you have Image defined as an class somewhere, it's technically invalid. Link to comment Share on other sites More sharing options...
chibineku Posted August 10, 2009 Report Share Posted August 10, 2009 Nope, it isn't even being called, but I tried it with pictures I had (which were gif format, but that is neither here nor there, but that is all I changed) and it works perfectly. You can take out the script in any event. Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted August 11, 2009 Report Share Posted August 11, 2009 (edited) This is your Transitional XHTML but only more transition-ing-er...erm...cleaner: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml"><head><title>**************</title><meta name="Keywords" content="***********" /><meta name="Description" content="****************" /><meta http-equiv="Content-type" content="text/html;charset=UTF-8" /><link rel="stylesheet" type="text/css" href="style.css" /></head><body><div><img src="images/bg.png" alt="" style="width: 100%; height: 100%" id="bg" /></div><table><tr><td style='text-align: center'><img src="images/logo.png" alt="logo" /></td></tr></table><div id="buttons" style="text-align: center; margin: 0 auto"><a href="about.xhtml"><img name="image1" src="images/about.jpeg" border="0" alt="About" /></a><a href="work.xhtml"><img name="image2" src="images/work.jpeg" border="0" alt="Work" /></a></div></body></html> I don't know how you got the page validated, it complains about the value of the width and height attributes of the bg image. Edited August 11, 2009 by FirefoxRocks 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