conditional comments

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have some problems getting my site to render properly in IE5 for win
2000 - although I've been told its OK in IE5 for win98. Is it possible for a
different version of windows to do this? Can anyone confirm that IE5 is OK
on win98. What does IE5.5 make of this page? /

I know its a simple page and it should render Ok in any browser and indeed I
am currently working on simplifying things. My main complication is the
extra complexity caused by having a div called 'internet page'. This div
gives me the ability to have a footer that appears at the bottom of the view
port or the canvas if the canvas is longer. I might get rid of this feature
as it might be part of the problem.
The problem is IE5 on win2000 and IE5.2 mac do not respect the relative
position of 200px left on the 'contentcontainer' div, so it all ends up
pressed against the left side of the screen. While I'm working on the
problem, would the code below give me an opportunity to redirect these two

<!--[if lte IE5.2]>
<?php header("Location: /");?>

I don't know if it is possible to be more specific in the condition like

<!--[if ((lte IE5.0 && win2000) || (macintosh && 5.2))]>
<?php header("Location: /");?>

Does that look like it has a chance of working - this is only a stop gap
while I correct the real problem i.e. a bloated page with dodgy code


Re: conditional comments

Quoted text here. Click to load it
This won't work, for multiple reasons.

1) PHP can't send headers after any body content (like that comment).

2) Even if you use output buffering or other tricks to get around
   that, the header gets sent separate to the body, so it won't 'appear'
   inside the conditional comment, and everyone gets redirected.

You *could* use a <meta> or Javascript-based refresh here, as a
temporary measure, assuming the conditional comment is in the document


Re: conditional comments

David Graham wrote:
Quoted text here. Click to load it

Yep, it ain't pretty.  Things overlap.

Quoted text here. Click to load it

Of course.

I can't say, yet.  See below.

Quoted text here. Click to load it

Before trying the difficult solution, which may not work, and which
will be harder to maintain, consider checking your css for errors.


If you need to have different css layouts, it's much easier to simply
exploit browsers' bugs or inability to parse certain css instructions.


And keep things simple.  You'll be glad in the long run.

follow the directions in my address to email me

Site Timeline