Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Conditions in CSS?


Message #1 by "Nyman, Robert" <Robert.Nyman@i...> on Fri, 11 Jan 2002 11:32:13 +0100
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C19AB2.2A46E530
Content-Type: text/plain

Oh ok.
I only get it to work in IE 6 (I can't test on previous versions, for
reasons I guess you're aware of...)...
 
 
/Robert
 

-----Original Message-----
From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...] 
Sent: den 11 januari 2002 15:24
To: javascript
Subject: [javascript] Re: Conditions in CSS?


it was the rules collection - I've not seen that before

-----Original Message-----
From: Nyman, Robert [mailto:Robert.Nyman@i...]
Sent: 11 January 2002 12:05
To: javascript
Subject: [javascript] Re: Conditions in CSS?


I just browsed trough the code, and it depends on what parts you're
wondering about...
But document.styleSheets, for instance, has been around since IE4+.
 
But I guess (merely a guess now) their code is IE4 (maybe IE 5) and up, and
Netscape 6, DOM compliant browsers etc.
 
 
/Robert
 
 

-----Original Message-----
From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...] 
Sent: den 11 januari 2002 12:45
To: javascript
Subject: [javascript] Re: Conditions in CSS?


I recognise that code - its used on the BBC news site to run the headline
ticker, I copied it a couple of years ago for a site I was working on at the
time.  I wonder if the BBC got it from webreference or if webreference got
it from them?  Anyway -  the style manipulations have been added since then
- is that something that only works in the latest browsers?

-----Original Message-----
From: Chris Scott [mailto:chris@e...]
Sent: 11 January 2002 11:28
To: javascript
Subject: [javascript] Re: Conditions in CSS?


Hi Robert,
 
Not sure if you can place the conditions in the stylesheet itself, but you
can create a function that changes the stylesheet properties & call from the
body onload.
 
This type of manipulation is shown in a ticker article at:
http://www.webreference.com/programming/javascript/professional/chap21/2/6.h
tml
<http://www.webreference.com/programming/javascript/professional/chap21/2/6.
html> 
 
HTH,
 
Chris

----- Original Message ----- 
From: Nyman, Robert <mailto:Robert.Nyman@i...>  
To: javascript <mailto:javascript@p...>  
Sent: Friday, January 11, 2002 10:32 AM
Subject: [javascript] Conditions in CSS?

Is there a way to write conditions in CSS, and then apply appropriate
format?
 
For example, I'd like to write it something like this:
 
#theDiv{width:(navigator.appVersion == "Netscape")? "400px" : "200px"}
 
 
 
Also, does anyone know of any REALLY advanced online CSS tutorials/examples?
 
 
/Robert
 

 
 
..............................................................
robert nyman, technical research manager	
fryxellsgatan 4, s-114 25 stockholm	

ph	 +46 (0)8 506 31 500	
d	 +46 (0)8 506 31 510	
m	 +46 (0)733 50 22 09	
f	 +46 (0)8 506 31 599	
e	 robert.nyman@i... <mailto:robert.nyman@i...> 	
www	 http://www.ibizkit.se <http://www.ibizkit.se/> 	
..............................................................	
 




________________________________________________________________________

Scottish Enterprise Network

http://www.scottish-enterprise.com


Headquarters Address & Contact Numbers


150 Broomielaw

5 Atlantic Quay

Glasgow

G2 8LU.

Tel: +44 (0) 141 248 2700.

Fax: +44 (0)141 221 3217


This message is sent in confidence for the addressee only.

It may contain legally privileged information. The contents are not to

be disclosed to anyone other than the addressee. Unauthorised recipients

are requested to preserve this confidentiality and to advise the sender

immediately of any error in transmission.






________________________________________________________________________

Scottish Enterprise Network

http://www.scottish-enterprise.com


Headquarters Address & Contact Numbers


150 Broomielaw

5 Atlantic Quay

Glasgow

G2 8LU.

Tel: +44 (0) 141 248 2700.

Fax: +44 (0)141 221 3217


This message is sent in confidence for the addressee only.

It may contain legally privileged information. The contents are not to

be disclosed to anyone other than the addressee. Unauthorised recipients

are requested to preserve this confidentiality and to advise the sender

immediately of any error in transmission.





  Return to Index