Welcome to WebmasterWorld Guest from 188.8.131.52
Forum Moderators: not2easy
Yep, you knew where I was going with this: it looks like monkey's bare @$$ in IE6/7.
For some reason the left column shifts 10 pixels to the right so that it's overlapping the middle column. No other browser exhibits this behavior.
Rather than tear my hair out trying to figure out how Microsoft screwed this one up, I'd like to use an expression to determine when the user's DPI setting is higher than 96, then adjust the left column accordingly.
Originally the element for my left sidebar was "left: 25px". I'd like to change that to "left: 15px" when the user DPI is higher than 96 for IE browsers.
So far I've come up with this:
left:expression(screen.deviceXDPI > 96 ? "15px" );
But IE is ignoring it. I'm assuming a few more things needed to be added to the expression before it gets recognized but I'm not sure what. Can anyone help?
Thanks for the suggestion! I got it to work and figured out why it wasn't doing it before. I was using a separate stylesheet for my IE hacks and placed the expression there. It wasn't working, so I placed it in my native stylesheet instead and it finally worked.
For some reason it ignores the expression when it's in my IE hacks stylesheet, and I have no idea why because my other expressions work just fine this way. Has this sort thing been a common issue before, and if so is there a fix/workaround?
It really annoys me too, but I may have to suffer having a single expression placed in my native stylesheet so visitors to my site with vision problems can still read my content easily.
Again works for me
<link rel="stylesheet" href="default.css" type="text/css" media="screen">
<link rel="stylesheet" href="DPI.css" type="text/css" media="screen">
Just a thought you haven't got those two style sheets the wrong way round?
Meaning your default one after your IE one. Which would overwite the style applied.
Or another style thats overwriting it.