Click to See Complete Forum and Search --> : Disappearing box in IE
jessnoonyes
10-25-2007, 11:17 AM
http://www.jnsitedesign.com/tommy/index.html
See the yellow box? It's always there where it should be unless someone opens the page in IE and only when they have a screen resolution of 1024. Anyone know why????
upand_at_them
10-25-2007, 01:46 PM
I see it in IE6 with screen resolution of 1280.
jessnoonyes
10-25-2007, 03:39 PM
:mad: This stupid website is ticking me off. Thanks!
dtm32236
10-25-2007, 04:00 PM
try adding a doctype:
http://www.alistapart.com/stories/doctype/
EVERY page on the internet should have this.
when you decide to add a doctype (i suggest using HTML 4.01 Strict), check your code for errors:
http://validator.w3.org/
and personally, i think that it looks better without the yellow - in my own opinion.
dtm32236
10-25-2007, 04:01 PM
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.jnsitedesign.com%2Ftommy%2Findex.html&charset=%28detect+automatically%29&doctype=Inline&group=0
jessnoonyes
10-25-2007, 04:24 PM
I'm making this for a friend and just doing what she wants. I figured out how to fix it with a different stylesheet for IE, but now here's my issue. I should probably post this in the javascript section but I'll ask here too. I have some code that will call a certain stylesheet depending on resolution. But now I need it to call the IE stylesheet when the resolution is a certain size, and only for IE. I have no idea how to change this code to do that, if it's even possible. Here's the code:
<script type="text/javascript">
if (screen.width < 1280)
link = document.getElementsByTagName( "link" )[ 0 ];
link.href = "style1.css";
</script>
I need it to open "style1ie.css" for IE people with a resolution under 1280.
Centauri
10-25-2007, 06:50 PM
If the page page coding was semantically correct and valid, then there would be not need for separate style sheets, different entry pages or javascript for cross-browser compliance. You are adding more and more stuff trying to correct problems caused by initial bad coding.
dtm32236
10-26-2007, 10:17 AM
centauri is right.
add a doctype, then validate your code and fix any errors.
when you do that, and your code is fixed, your page will look fine in all browsers at any resolution.
dtm32236
10-26-2007, 10:20 AM
your doctype is incorrect.
you have:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
change this to:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
although, strict doctypes are recommended:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
WebJoel
10-28-2007, 06:14 PM
'Warnings', -some of which are actually page-busting errors. :o Screenshot image: