The Praetorian Posted October 4, 2006 Share Posted October 4, 2006 I asked this a while ago, but no one seemed to have any answers. So I'll give it another shot.Take a look at my website ( http://www.tsrealms.com ) in IE on 800x600. Then look at in any other browser. Why is it that only IE refuses to fit? All the other browsers show it fine with the width I have on that table, but IE won't...Any ideas? Link to comment Share on other sites More sharing options...
Err Posted October 4, 2006 Share Posted October 4, 2006 Hmm... it looks like the image is causing that vertical scroll bar to appear in IE (Why only IE...? I don't know). You can always try to make your banner a background-image so matter what resolution a user may have it will always fit. Link to comment Share on other sites More sharing options...
Jonas Posted October 4, 2006 Share Posted October 4, 2006 Doesoverflow-x: hidden;work in IE? Don't remember, but you can try putting that in body { }Or you can put a this in the body { }overflow: auto;but either way I think it requires a width/height. But then again you can use min-height and max-height for FF and Opera, and then in IE you can use conditional comments:<![if lte IE 6]><style type="text/css">body { width: ??px; height: ??px; }</style><![/end if]>Hopefully that'll work... Link to comment Share on other sites More sharing options...
The Praetorian Posted October 4, 2006 Author Share Posted October 4, 2006 Okay, adding the conditional statement creates the weird effect of making a second vertical scroll bar within the browser window. Changing it so that the conditional statement effects the table width does nothing at all.This is part of the thing that's been annoying me. Shouldn't the image resize to fit the table width when I change it? It does in all the other browsers, but in IE the image seems to want to push the edges of the table out past the edge of the browser...EDIT:Okay. Once again, IE apparently ignores percents. When I use the conditional statement to make the width of the image a px number, it responds. Anyone know if the conditional statement will work in a .css file? Or if it only works in an html? Link to comment Share on other sites More sharing options...
Jonas Posted October 4, 2006 Share Posted October 4, 2006 Works only in HTML. Of course, there are several other CSS hacks, but none that validate I think. Conditional comments are read by the validator and other browsers as, well, comments. More on that here:http://w3schools.invisionzone.com/index.php?showtopic=7567 Link to comment Share on other sites More sharing options...
The Praetorian Posted October 4, 2006 Author Share Posted October 4, 2006 On a side note, that conditional comment effected how my page looked on FF... not just IE. Link to comment Share on other sites More sharing options...
Jonas Posted October 4, 2006 Share Posted October 4, 2006 What? How so? Try this variation then:<!--[if lte IE 6]><style type="text/css">body { width: ??px; height: ??px; }</style><![/end if]--> Link to comment Share on other sites More sharing options...
The Praetorian Posted October 4, 2006 Author Share Posted October 4, 2006 Okay, that one works, except that in IE the <![/end if]--> appears at the top of the page. Link to comment Share on other sites More sharing options...
reportingsjr Posted October 4, 2006 Share Posted October 4, 2006 Thats because there isnt a slash in it X-D. Silly little mistake.. its really <![end if]-->, not an actual tag . Link to comment Share on other sites More sharing options...
Jonas Posted October 4, 2006 Share Posted October 4, 2006 Actually I notice it's [endif]. One word. http://msdn.microsoft.com/library/default....comment_ovw.aspOh, and on a side note, I hate IE as well. Link to comment Share on other sites More sharing options...
The Praetorian Posted October 4, 2006 Author Share Posted October 4, 2006 Yep. That works fine. Here's another question though. Is there a conditional code for screen resolution? Link to comment Share on other sites More sharing options...
Jonas Posted October 4, 2006 Share Posted October 4, 2006 Nope, but you can combine conditional comments with java script:<!--[if lte IE 6]><script type="text/javascript">// Your javascript screen resolution sniffer code here./* This script will only execute if the user agent is Internet Explorer version 6 or lower */</script><![endif]--> 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