Help - Search - Members - Calendar
Full Version: Browser trouble with my homepage (IE specifically)
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
smughelp
I am building a site and can't figure out why Internet Explorer won't load my homepage and nav bar correctly.

www.smugmugpros.com

Thanks in advance!

Code:

<html>
<head>

<script LANGUAGE="JavaScript">
<!-- Begin
loadImage1 = new Image();
loadImage1.src = "pictures/homedark.jpg";
staticImage1 = new Image();
staticImage1.src = "pictures/home.jpg";

loadImage2 = new Image();
loadImage2.src = "pictures/aboutdark.jpg";
staticImage2 = new Image();
staticImage2.src = "pictures/about.jpg";

loadImage3 = new Image();
loadImage3.src = "pictures/servicesdark.jpg";
staticImage3 = new Image();
staticImage3.src = "pictures/services.jpg";

loadImage4 = new Image();
loadImage4.src = "pictures/testimonialsdark.jpg";
staticImage4 = new Image();
staticImage4.src = "pictures/testimonials.jpg";

loadImage5 = new Image();
loadImage5.src = "pictures/contactdark.jpg";
staticImage5 = new Image();
staticImage5.src = "pictures/contact.jpg";

// End -->
</script>
<style>
body {
background-color: #000000;
color: #FFFFFF;
width: 100%;
height: 100%;
font-family: arial;
text-align: center;}

.logofor {
text-align: center;
padding-top: 6%;
padding-bottom: 4%;}

.pieces {
float: left;
width: 141px;
position: relative;
text-align: center;}
</style>
</head>
<body>
<div class="logofor">
<img src="pictures/logo.jpg"/>
</div>
<div style="width: 705px; margin: auto; text-align: center;">
<div class="pieces">
<a href="index.html" onmouseover="image1.src=loadImage1.src;" onmouseout="image1.src=staticImage1.src;">
<img name="image1" src="pictures/home.jpg" border=0></a>
</div>
<div class="pieces">
<a href="about.html" onmouseover="image2.src=loadImage2.src;" onmouseout="image2.src=staticImage2.src;">
<img name="image2" src="pictures/about.jpg" border=0></a>
</div>
<div class="pieces">
<a href="services.html" onmouseover="image3.src=loadImage3.src;" onmouseout="image3.src=staticImage3.src;">
<img name="image3" src="pictures/services.jpg" border=0></a>
</div>
<div class="pieces">
<a href="testimonials.html" onmouseover="image4.src=loadImage4.src;" onmouseout="image4.src=staticImage4.src;">
<img name="image4" src="pictures/testimonials.jpg" border=0></a>
</div>
<div>
<a href="contact.html" onmouseover="image5.src=loadImage5.src;" onmouseout="image5.src=staticImage5.src;">
<img name="image5" src="pictures/contact.jpg" border=0></a>
</div>
</div>
<div style="font-size: 10px; padding-top: 5%">
Copyright © 2009 Smug Mug Pros All Rights Reserved
</div>
</body>
</html>
john f
Document validated at http://htmlhelp.com/tools/validator

•Character encoding: Unknown; assuming ISO-8859-1
•Level of HTML: Unknown
Errors and Warnings
•Line 1, character 1:
<html>
^Error: missing document type declaration; assuming HTML 4.01 Transitional

•Line 4, character 30:
<script LANGUAGE="JavaScript">
^Error: required attribute TYPE not specified

•Line 35, character 7:
<style>
^Error: required attribute TYPE not specified

•Line 61, character 7:
</head>
^Error: missing a required sub-element of HEAD

•Line 68, character 29:
<img src="pictures/logo.jpg"/>
^Warning: net-enabling start-tag; possibly missing required quotes around an attribute value

•Line 68, character 29:
<img src="pictures/logo.jpg"/>
^Error: required attribute ALT not specified

•Line 77, character 52:
... ="pictures/home.jpg" border=0></a>
^Error: required attribute ALT not specified

•Line 82, character 53:
... "pictures/about.jpg" border=0></a>
^Error: required attribute ALT not specified

•Line 87, character 56:
... ctures/services.jpg" border=0></a>
^Error: required attribute ALT not specified

•Line 92, character 60:
... es/testimonials.jpg" border=0></a>
^Error: required attribute ALT not specified

•Line 97, character 55:
... ictures/contact.jpg" border=0></a>
^Error: required attribute ALT not specified
Darin McGrew
The missing doctype throws browsers into quirks mode:
http://hsivonen.iki.fi/doctype/
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.