Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Conditional CSS Question...

Reply
Thread Tools

Conditional CSS Question...

 
 
Andrew
Guest
Posts: n/a
 
      01-31-2007
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

--
The STRONG Family Web Site
http://www.strong-family.org
 
Reply With Quote
 
 
 
 
Spartanicus
Guest
Posts: n/a
 
      01-31-2007
Andrew <(E-Mail Removed)> wrote:

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

--
Spartanicus
 
Reply With Quote
 
 
 
 
Andrew
Guest
Posts: n/a
 
      01-31-2007
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

--
The STRONG Family Web Site
http://www.strong-family.org
 
Reply With Quote
 
Dylan Parry
Guest
Posts: n/a
 
      01-31-2007
Spartanicus wrote:

> 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.
 
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
CSS color conditional on content Summercool HTML 3 11-23-2007 05:03 PM
? ELSE Conditional Comment / Using Conditional Comments Inside Other Tags To Comment Out Attributes Alec S. HTML 10 04-16-2005 02:21 AM
CSS Layout question - how to duplicate a table layout with CSS Eric ASP .Net 4 12-24-2004 04:54 PM
Is there a way to set the a CSS property to be explicitly the same as another CSS property? Joshua Beall HTML 1 12-10-2003 07:21 PM
print.css and screen.css tom watson HTML 1 09-09-2003 02:48 PM



Advertisments