Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > conditional comments

Reply
Thread Tools

conditional comments

 
 
David Graham
Guest
Posts: n/a
 
      07-22-2003
Hi
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?

http://www.catalysys.co.uk/sefriendly/

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
browsers.


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

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

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

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

thanks
David





 
Reply With Quote
 
 
 
 
Chris Morris
Guest
Posts: n/a
 
      07-22-2003
"David Graham" <> writes:
> <!--[if lte IE5.2]>
> <?php header("Location: http://www.xxx.com/");?>
> <![endif]-->


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
head.

--
Chris
 
Reply With Quote
 
 
 
 
Chris Morris
Guest
Posts: n/a
 
      07-22-2003
"David Graham" <> writes:
> The meta refresh could be like this?
>
> <meta http-equiv="refresh" content="5; url=http://www.xxx.com/">
>
> If I wanted it to happen as instantly as possible, do I just leave out the
> five and the semicolon?


The 5 is a time in seconds. You could theoretically do 0 or 1. The
implementation of meta refresh isn't great, though. As long as it's
very temporary while you fix the underlying problem it shouldn't be so
bad, though.

That said, meta refresh is really inconvenient in screen readers /
speech browsers, lots of which may use IE as their HTTP (and sometimes
HTML-parsing) agent.

> Can the url be relative as opposed to absolute?


*Some* browsers let you get away with that, I can't remember if IE5 is
one of them. It's supposed to be absolute, though.

--
Chris
 
Reply With Quote
 
Brian
Guest
Posts: n/a
 
      07-22-2003
David Graham wrote:
>
> http://www.catalysys.co.uk/sefriendly/
> I have some problems getting my site to render properly in IE5 for win
> 2000 -


Yep, it ain't pretty. Things overlap.


> although I've been told its OK in IE5 for win98. Is it possible for a
> different version of windows to do this?


Of course.

> 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.


I can't say, yet. See below.

> would the code below give me an opportunity to redirect these two
> browsers.
>
> <!--[if lte IE5.2]>
> <?php header("Location: http://www.xxx.com/");?>
> <![endif]-->


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

< http://jigsaw.w3.org/css-validator/ >

http://jigsaw.w3.org/css-validator/v.../&profile=css2

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

< http://w3development.de/css/hide_css_from_browsers/ >

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

--
Brian
follow the directions in my address to email me

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Default IE8 Compatibility View breaks conditional comments David Mark Javascript 4 05-13-2010 03:53 AM
What's Up With Conditional Comments for IE? vunet HTML 5 10-16-2008 08:07 PM
? ELSE Conditional Comment / Using Conditional Comments Inside Other Tags To Comment Out Attributes Alec S. HTML 10 04-16-2005 02:21 AM
Quick Conditional Comments Question e n | c k m a HTML 8 07-20-2004 10:54 PM
IE conditional comments not quite working delerious@no.spam.com HTML 6 12-27-2003 08:21 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57