Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-08-31 18:51:23

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

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

#2 2006-08-31 20:25:07

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2006-09-01 05:42:36

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

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

Board footer

Powered by FluxBB