Welcome to Dream.In.Code
Become an Expert!

Join 149,530 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,515 people online right now. Registration is fast and FREE... Join Now!




defining stylesheet based on browser

 
Reply to this topicStart new topic

defining stylesheet based on browser

fyrestorm
13 Jun, 2007 - 06:24 AM
Post #1

D.I.C Lover
Group Icon

Joined: 4 Apr, 2002
Posts: 3,103



Thanked: 2 times
Dream Kudos: 228
My Contributions
I'm curious, because of the incompetence of IE, is it possible to define a stylesheet specifically for IE and one for all other browsers in my code?
User is offlineProfile CardPM
+Quote Post

skyhawk133
RE: Defining Stylesheet Based On Browser
13 Jun, 2007 - 06:59 AM
Post #2

Head DIC Head
Group Icon

Joined: 17 Mar, 2001
Posts: 15,262



Thanked: 61 times
Dream Kudos: 1650
Expert In: Web Development

My Contributions
The short answer is yes.

The long answer can be found here: http://virtuelvis.com/archives/2004/02/css-ie-only

You have to use external stylesheets (i.e. not inline), but it does work.
User is offlineProfile CardPM
+Quote Post

fyrestorm
RE: Defining Stylesheet Based On Browser
13 Jun, 2007 - 07:11 AM
Post #3

D.I.C Lover
Group Icon

Joined: 4 Apr, 2002
Posts: 3,103



Thanked: 2 times
Dream Kudos: 228
My Contributions
QUOTE(skyhawk133 @ 13 Jun, 2007 - 06:59 AM) *

The short answer is yes.

The long answer can be found here: http://virtuelvis.com/archives/2004/02/css-ie-only

You have to use external stylesheets (i.e. not inline), but it does work.


thanks, i'll play around smile.gif
User is offlineProfile CardPM
+Quote Post

1lacca
RE: Defining Stylesheet Based On Browser
13 Jun, 2007 - 08:27 AM
Post #4

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 12 times
My Contributions
I recommend studying how Dave Shea at Mezzoblue is doing it.
Here is his css
He uses different hacks for:
IE5-6 for Windows
IE5/Win
IE5/Mac
(check the imports)
Although the conditional statement is a more elegant way if oyu don't have to aim each of these browsers separately (and maybe it can do it as well, I don't remember clearly).
User is offlineProfile CardPM
+Quote Post

fyrestorm
RE: Defining Stylesheet Based On Browser
13 Jun, 2007 - 01:05 PM
Post #5

D.I.C Lover
Group Icon

Joined: 4 Apr, 2002
Posts: 3,103



Thanked: 2 times
Dream Kudos: 228
My Contributions
QUOTE(1lacca @ 13 Jun, 2007 - 08:27 AM) *

I recommend studying how Dave Shea at Mezzoblue is doing it.
Here is his css
He uses different hacks for:
IE5-6 for Windows
IE5/Win
IE5/Mac
(check the imports)
Although the conditional statement is a more elegant way if oyu don't have to aim each of these browsers separately (and maybe it can do it as well, I don't remember clearly).


I love Dave Shea, I have his book, I know his brother-in-law. But at this point, I don't want to deal with too many hacks, I just want 1 style sheet for everything not IE and one for IE. My site is completely designed in CSS at this point, and I was looking at it in FF last night and it was perfect. This morning I open it in IE and it was fricken hideous...I really hate microsoft and their non-conformance to standards. Theoretically, we shouldn't have to be using any hacks.
User is offlineProfile CardPM
+Quote Post

1lacca
RE: Defining Stylesheet Based On Browser
13 Jun, 2007 - 09:46 PM
Post #6

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 12 times
My Contributions
Theoretically sad.gif

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 08:57PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month