Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Browser Specific Style Sheets
Old 12-15-2008, 03:51 PM Browser Specific Style Sheets
mb2000inc's Avatar
Super Talker

Posts: 140
Name: Mark
Location: Ohio
Trades: 0
I have a CSS related question... I'm working in 4 browsers (FireFox, Safari, IE6, and IE7 - -separately).
The only one that's giving me an issue is IE7.... does anyone know how to tell the browser to look for a specific style sheet?

I tried this...
Code:
<!--[if lt IE 7]>
    <link rel="stylesheet" type="text/css" href="ie7Fix.css" /> 
 <![endif]-->
Even though I'm already running this:
Code:
<script type="text/javascript">
     if (document.createStyleSheet)
         document.createStyleSheet("<%= SkinPath %>ieFix.css");
 </script>

OR
- Does anyone know how to make it look at more than one stylesheet at a time or combine them by taking the above code and splitting it up?
I'm stuck and I need this to work for my job... the boss is kinda riding me.
__________________
Need a vacation.
mb2000inc is offline
Reply With Quote
View Public Profile Visit mb2000inc's homepage!
 
 
Register now for full access!
Old 12-15-2008, 04:20 PM Re: Browser Specific Style Sheets
serandfae's Avatar
Do the "Evil Nanner" !!!

Posts: 8,936
Name: Tim Daily
Location: Apex, NC, US, Sol 3
Trades: 0
If you're just trying to put in fixes for IE7, the first code sample is preferable, should javascript be disabled. You can link to as many stylesheets as you want, bearing in mind that the browser will read them in the order they are linked to, and whatever rules come last for a specific class/ID will be what are used. And a local style rule will override those.

tim
__________________
SEO "experts" smell like Big Fish_|_
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

serandfae is offline
Reply With Quote
View Public Profile Visit serandfae's homepage!
 
Old 12-15-2008, 04:38 PM Re: Browser Specific Style Sheets
mb2000inc's Avatar
Super Talker

Posts: 140
Name: Mark
Location: Ohio
Trades: 0
Ah, you are correct! Thanks...
Code:
<!--[if IE 6]>
    <link href="ieFix.css" rel="stylesheet" type="text/css">
<![endif]-->
<!--[if IE 7]
    <link href="ie7Fix.css" rel="stylesheet" type="text/css">
<![endif]-->
It's always the simple things that catch me off guard... and cause me to panic.

Thanks again. You rock!
__________________
Need a vacation.
mb2000inc is offline
Reply With Quote
View Public Profile Visit mb2000inc's homepage!
 
Old 12-17-2008, 04:40 AM Re: Browser Specific Style Sheets
Super Talker

Posts: 143
Trades: 0
ah the style sheet wars. Yes, and one code to rule them all....

__________________

Please login or register to view this content. Registration is FREE
specialk is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Browser Specific Style Sheets
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.14292 seconds with 12 queries