Conditional IF in external stylesheet

This is a discussion on "Conditional IF in external stylesheet" within the Web Page Design section. This forum, and the thread "Conditional IF in external stylesheet are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Sep 22nd, 2007, 21:57
Highly Reputable Member
Join Date: Jul 2006
Location: Devon, England
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
Conditional IF in external stylesheet

Is it possible to use this conditional IF in an external stylesheet or has it got be embedded in the head section

Code: Select all
 
<!--[if IE]>
p.iepara{ /*Conditional CSS- For IE (inc IE7), create 1em spacing between menu and paragraph that follows*/
padding-top: 1em;
}
<![endif]-->
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Sep 22nd, 2007, 22:18
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Conditional IF in external stylesheet

Quote:
Originally Posted by AdRock View Post
Is it possible to use this conditional IF in an external stylesheet or has it got be embedded in the head section

Code: Select all
 
<!--[if IE]>
p.iepara{ /*Conditional CSS- For IE (inc IE7), create 1em spacing between menu and paragraph that follows*/
padding-top: 1em;
}
<![endif]-->
No. It must be in the <head>.

CSS and HTML syntaxes are different; you can't just swap them and expect it to work!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Sep 22nd, 2007, 23:04
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Conditional IF in external stylesheet

Quote:
Originally Posted by MikeHopley View Post
No. It must be in the <head>.

CSS and HTML syntaxes are different; you can't just swap them and expect it to work!
Yeah I've wanted to do this :/
Someone should develop dynamic css or something
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Sep 23rd, 2007, 13:26
Highly Reputable Member
Join Date: Jul 2006
Location: Devon, England
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Conditional IF in external stylesheet

You would think it would be possible becuase either in the head or in an external stylesheet, it's all going into the head anyway
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Sep 23rd, 2007, 13:28
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Conditional IF in external stylesheet

Quote:
Originally Posted by AdRock View Post
You would think it would be possible becuase either in the head or in an external stylesheet, it's all going into the head anyway
yeah.
maybe css3 will bring this change
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Sep 23rd, 2007, 22:13
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Conditional IF in external stylesheet

Quote:
Originally Posted by alexgeek View Post
yeah.
maybe css3 will bring this change
Think about it a moment. Use your brain!

Conditional comments are a proprietary Microsoft feature. They are not part of the (X)HTML or CSS standards. And you think CSS3 will implement this (pointless) "CCs in the stylesheet" method? You expect CSS3 to add browser-specific extensions?

Microsoft could implement it, but it's ludicrous to imagine this becoming part of the CSS3 spec.

Quote:
Originally Posted by alexgeek View Post
Someone should develop dynamic css or something
Does that even mean anything? In what sense "dynamic"? Like javascript?

Or just "dynamic" as in, "cool and advanced, in some unspecified but totally revolutionary way, man; like, open your minds, W3C dudes"?

...or something.

Last edited by MikeHopley; Sep 23rd, 2007 at 22:18.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Sep 23rd, 2007, 22:45
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Conditional IF in external stylesheet

Quote:
Originally Posted by MikeHopley View Post
Think about it a moment. Use your brain!

Conditional comments are a proprietary Microsoft feature. They are not part of the (X)HTML or CSS standards. And you think CSS3 will implement this (pointless) "CCs in the stylesheet" method? You expect CSS3 to add browser-specific extensions?

Microsoft could implement it, but it's ludicrous to imagine this becoming part of the CSS3 spec.



Does that even mean anything? In what sense "dynamic"? Like javascript?

Or just "dynamic" as in, "cool and advanced, in some unspecified but totally revolutionary way, man; like, open your minds, W3C dudes"?

...or something.
No I was being optimistic
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Type Input in Conditional Statement affirmallchance Flash & Multimedia Forum 3 Jan 9th, 2008 11:30
Functions and conditional IFs AdRock PHP Forum 4 Sep 17th, 2007 08:18
Two javascripts. One page. One external Stylesheet. BIG problem. So amateur. laundromat1967 JavaScript Forum 1 Aug 23rd, 2007 22:23
external stylesheet doesn't display right Irvy Web Page Design 10 Dec 18th, 2006 19:41
ASP stylesheet switcher with conditional comments Shelly Classic ASP 1 Apr 19th, 2006 12:44


All times are GMT. The time now is 06:15.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

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