Conditional CSS Question...

A

Andrew

Hi,

More so than I can come to grips with conditional comments I have tried
and failed to set some css for IE5. The page containing the css can be
seen:
http://people.aapt.net.au/~adjlstrong/

I understood that by specifying:

<!--[if IE 5]>
<link rel="stylesheet" type="text/css" href="ie5.css" />
<![endif]-->

I would include all versions of IE whose version numbers started with 5,
and that the following simple css would center the main div on the page:

body {text-align: center;}
#content {text-align: left;}

but it does not work!! What am I doing wrong?

Thanks to anybody who can clear this up for me,

Andrew
 
S

Spartanicus

Andrew said:
More so than I can come to grips with conditional comments I have tried
and failed to set some css for IE5. The page containing the css can be
seen:
http://people.aapt.net.au/~adjlstrong/

I understood that by specifying:

<!--[if IE 5]>
<link rel="stylesheet" type="text/css" href="ie5.css" />
<![endif]-->

I would include all versions of IE whose version numbers started with 5,
Correct.

and that the following simple css would center the main div on the page:

body {text-align: center;}
#content {text-align: left;}

The important info you left out is that div#content has a defined width
of 90%, given that, IE5.x should center div#content.
but it does not work!!

Note that the available hacks to emulate multiple versions of IE on a
single machine do not evaluate CCs correctly.
 
A

Andrew

On Wed, 31 Jan 2007 10:55:51 +0000, Spartanicus wrote:

snip >>>>>>>>>
Note that the available hacks to emulate multiple versions of IE on a
single machine do not evaluate CCs correctly.

Hi Spartanicus,

Thanks for your insight. I am hoping that this does not hold true for
IEs4Linux which I will install tomorow:

http://www.tatanka.com.br/ies4linux/page/Main_Page

This should give me 6, 5.5 and 5 and hopefully a decent test for
conditional comments. If not I have a copy of IE6 for offline testing
anyway :)

Thanks again for your trouble,

Andrew
 
D

Dylan Parry

Spartanicus said:
Note that the available hacks to emulate multiple versions of IE on a
single machine do not evaluate CCs correctly.

Not true. Multiple IE installer (http://tredosoft.com/Multiple_IE) will
take care of installing every version of IE for you, *and* fixes the
problem with conditional comments not working.

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

Programming, n: A pastime similar to banging one's head
against a wall, but with fewer opportunities for reward.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top