Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-22-2009, 04:33 AM   PM User | #1
sixrfan
Regular Coder

 
Join Date: Aug 2009
Posts: 395
Thanks: 116
Thanked 0 Times in 0 Posts
sixrfan has a little shameless behaviour in the past
IE CSS hack troubles

how come the IE 6 specific hack i have in place is also being applied in regular IE 8?

thanks in advance!

Code:
<link href="../style_sheets/pt_style.css" rel="stylesheet" type="text/css" />

<!–-[if IE 6]>
<link rel="stylesheet" href="../style_sheets/ie.css" type="text/css" media="screen" />
<![endif]–->
sixrfan is offline   Reply With Quote
Old 09-22-2009, 05:02 AM   PM User | #2
seco
Regular Coder

 
seco's Avatar
 
Join Date: Nov 2008
Location: Oregon
Posts: 682
Thanks: 5
Thanked 79 Times in 77 Posts
seco has a little shameless behaviour in the past
cause <!–-[if IE 6]> isnt a hack.

try

Code:
<!--[if lte IE 6]>
    css link here
<![endif]-->
seco is offline   Reply With Quote
Old 09-22-2009, 02:59 PM   PM User | #3
sixrfan
Regular Coder

 
Join Date: Aug 2009
Posts: 395
Thanks: 116
Thanked 0 Times in 0 Posts
sixrfan has a little shameless behaviour in the past
i tried that too. here's what i have now;

Code:
<!–-[if lte IE 6]>
<link rel="stylesheet" href="../style_sheets/ie.css" type="text/css" media="screen" />
<![endif]–->
however, it's effecting IE 8. any idea why???? thanks.
sixrfan is offline   Reply With Quote
Old 09-22-2009, 03:01 PM   PM User | #4
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,817
Thanks: 9
Thanked 681 Times in 675 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
Got a link to your page?
SB65 is offline   Reply With Quote
Old 09-22-2009, 03:24 PM   PM User | #5
sixrfan
Regular Coder

 
Join Date: Aug 2009
Posts: 395
Thanks: 116
Thanked 0 Times in 0 Posts
sixrfan has a little shameless behaviour in the past
PM sent with URL.

actually it gets even more bizarre. apparently its effecting Firefox as well?!

any ideas? thanks!

Last edited by sixrfan; 09-22-2009 at 03:26 PM.. Reason: me no type good.
sixrfan is offline   Reply With Quote
Old 09-22-2009, 04:04 PM   PM User | #6
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,817
Thanks: 9
Thanked 681 Times in 675 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
Weirdest of the day...

It's your if statement: <!–-[if lte IE 6]>

If you look closely, the first dash after the exclamation mark isn't a dash - it's another character - so the statement isn't being interpreted as a comment/conditional for IE - so everything including IE8 and Firefox is using the ie.css.

Hard to spot - I pasted into DW and it looked identical to a correctly formatted statement - although DW highlighted it as an error. Had to paste into Word before I could see the difference....
SB65 is offline   Reply With Quote
Users who have thanked SB65 for this post:
sixrfan (09-22-2009)
Old 09-22-2009, 04:25 PM   PM User | #7
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Quote:
If you look closely, the first dash after the exclamation mark isn't a dash - it's another character
Brilliant! both you and the OP
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 09-22-2009, 06:26 PM   PM User | #8
sixrfan
Regular Coder

 
Join Date: Aug 2009
Posts: 395
Thanks: 116
Thanked 0 Times in 0 Posts
sixrfan has a little shameless behaviour in the past
friggin brilliant catch. i would not have spotted that or even known to spot it in a million years. thank you!
sixrfan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 07:13 PM.


Advertisement
Log in to turn off these ads.