Perfect S. Posted February 2, 2007 Share Posted February 2, 2007 EDIT: Fixed, thanks!I am working on my school's website trying to make it follow all the rules of XHTML (I kind of forgot some important parts).Here's the website which is working fine the way it is.When I was fixing it on my local computer (not on the server) from: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <!--OOPS--> To <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> the images in the header displayed funny in IE 6 (on the left and right they are pushed in several pixels):The page displayed fine after I removed: <?xml version="1.0" encoding="UTF-8"?> Here's my css for the layout: div#header { position: absolute; top: 0px; left: 0px; margin: 0px; padding: 0px; height: 200px; min-width: 780px; width: expression(document.body.clientWidth < 780? "780px": "100%"); background-image: url(../LayoutImages/BANNER-REPEAT.gif); background-repeat: repeat; z-index: 1;} div#content { position: absolute; left: 135px; top: 210px; margin: 0px; padding: 0px; min-width: 635px; width: expression(document.body.clientWidth < 780? "635px": document.body.clientWidth - 145 + "px"); z-index: 2;}div#navbar { position: absolute; left: 0px; top: 200px; width: 125px; z-index: 3;}img.right { margin: 0px; padding: 0px; display: inline; float: right; border: none;} img.left { margin: 0px; padding: 0px; display: inline; float: left; border: none;} img.navimage { margin: 0px; padding: 0px; border: none;}img.tvdsb { margin: 0px; padding: 0px; border: none; vertical-align: bottom;} Sorry, I'm new at this and am still learning. Does anyone know why the display of the images changes after I add in that line? As far as I can tell the javascript I put in the css for IE really has no effect on how the images display... it just makes a min width for IE. My school uses IE 6 only... so it's important that things work properly in IE 6.ANY help is greatly appreciated. Thank you. Link to comment Share on other sites More sharing options...
jlhaslip Posted February 2, 2007 Share Posted February 2, 2007 I am not certain of all the gory, technical details on this, but it seems that not all Browsers handle that line of code. So it probably forced your site into 'quirks' mode, which means the design is a best guess rendering and has no consistency between Browsers. The alternative to quirks mode is 'standards compliant' mode, which is 'more consistently displayed' the same between different Browsers. Link to comment Share on other sites More sharing options...
Perfect S. Posted February 4, 2007 Author Share Posted February 4, 2007 Thanks for the suggestion, you're probably right.I changed it so that I now use <span> to format the images in the header and removed some other stuff and it worked fine for FF and IE after adding the line.Thanks! Link to comment Share on other sites More sharing options...
aquatsr Posted February 4, 2007 Share Posted February 4, 2007 I have a suggestion: keep the colors for the heading and logo only, and take it off for the page content and menu. All the bright yellow seriously hurts the eyes.Remember, a website like yours is mainly to showcase information, which should be easily accessible and exceedingly easy to read. Link to comment Share on other sites More sharing options...
boen_robot Posted February 4, 2007 Share Posted February 4, 2007 jlhaslip is correct. IE6 has a bug which forces it into quirks mode when it encounters the XML prolog. If you want to be compatable with it, you need to remove the XML prolog. It's optional anyway, so there's no harm in removing it.By the way, there's no requirement for the DTD to be indented in any sort, and scince your first variant uses less whitespace, it's actually more efficient, scince it downloads slightly faster. 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