TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 07-10-2008, 10:10 PM   #1 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default CSS and if statements

Does anybody know much about CSS and conditional statements?

I have the following fixes in my CSS;

Code:
<!--[if IE 5]>
img, div {behavior: url('iepngfix.htc');}
<![endif]-->
<!--[if lt IE 7 ]>
body {behavior:url('csshover.htc');}
<![endif]-->
The first is obviously the IE pngfix, the second being the Internet Explorer :hover pseudo class fix. Now when I put these at the top of my global.css it breaks my layout in FF3. When I place it at the bottom, it doesn't. Why this is? I'm not sure and would be curious to know, especially since I don't have pre IE 7 to test either of the fixes locally to see if they're even working properly.
-m
delayedinsanity is offline  
Reply With Quote
Old 07-10-2008, 10:55 PM   #2 (permalink)
The Acquainted
 
wGEric's Avatar
 
Join Date: Nov 2007
Posts: 166
Thanks: 0
wGEric is on a distinguished road
Default

Those need to go in the HTML and not the CSS. You may need to do it outside of the <style> tag. I'm not sure on that.
__________________
Eric
wGEric is offline  
Reply With Quote
The Following User Says Thank You to wGEric For This Useful Post:
delayedinsanity (07-10-2008)
Old 07-10-2008, 11:20 PM   #3 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

Outside the style? Ahh, okay I've never used conditionals in my CSS before, but I love png, and I just built a style set that uses :hover on elements other than A, so I figured why not give it a go.

Got it fixed, I placed the fixes in their own stylesheet and added the following to my html;

Code:
<!--[if lt IE 7 ]>
<link href="/bin/exploder.css" rel="stylesheet" type="text/css" media="screen" />
<![endif]-->
...and done. Thanks again,
-m
delayedinsanity is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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


All times are GMT. The time now is 07:14 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design