Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Expression to emulate max-width in IE: almost there, but...
Idea is simple:
Use max-width in your good styles. Use conditional comments to feed alternate/hacky styling to IE. Use an expression to emulate the max-width behavior in IE.
It’s all working, as you can see by clicking around in the main navigation (use IE), but stop in the portfolio section and click any of the thumbnails in the right column…instead of the expected width, the screen jumps to full-width.
I don’t believe it’s a CSS issue, nor even an expression issue, or using the primary nav links would make it do the same thing. It must be something else but I haven’t a clue what. Ideas?
Here’s the relevant container:
#container {
margin: 0 auto 0 auto;
border-right: 1px solid #ddccc6;
border-bottom: 1px solid #ddccc6;
border-left: 1px solid #ddccc6;
padding: 0;
max-width: 76em;
min-width: 765px;
}
And here’s the relevant expression to beeotch-slap…er fool IE:
* html #container {
width:expression(document.body.clientWidth > 1000 ? "965px" : "auto" );
}
Side:
And can someone tell me once and for all how to block code something in this forum so Textile stops farking it up? Isn’t that posted somewhere already. Danged if I can find it. (That’s supposed to be straigh-quotes around the expression values.)
Last edited by Destry (2006-08-31 19:16:30)
Offline
Re: Expression to emulate max-width in IE: almost there, but...
Hi Destry!
I think I found the problem:
<code><link rel=“stylesheet” type=“text/css” href=“styles/ieAll.css” media=“screen”></code>
It should be:
<code><link rel=“stylesheet” type=“text/css” href=”/styles/ieAll.css” media=“screen”></code>
The “error” happens not only in the portfolio entries but also in individual article pages.
The “problem” is a problem of absolut path and relative paths, when you are in a deeper “level” in your site.
Sorry for my english.
Once again: I love your site and your articles! Keep’em coming!
Last edited by maniqui (2006-08-31 20:25:41)
Offline
Re: Expression to emulate max-width in IE: almost there, but...
Good catch, Maniqui. Thank you very much. One of those things where if it was a poisonous snake….
Offline