Preserved Topic: Separate Stylesheets? (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
posted 06-26-2001 22:52
Is there a good way to use different stylesheets for different browsers? |
Maniac (V) Mad Scientist From: the west wing |
posted 06-27-2001 01:11
Well, what I often do is create two css documents. One is loaded with the standard... |
Maniac (V) Inmate From: under the bed |
posted 06-27-2001 02:16
thanks for the clarification on the use of @import - very helpful |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 06-27-2001 02:22
We use JS to differentiate between versions. |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 06-27-2001 08:59 |
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
posted 06-27-2001 17:00
Hmm, thanks everyone. That's an interesting idea Max, and it might actually be the best since my website is the only one on this machine, I'm sure my admin would let me parse regular .html files for PHP so I wouldn't even need to change the filenames... |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 08-10-2001 16:24
http://www.gurusnetwork.com/tutorials/approval/phpbrowserdetector.html might help with the actual browser detection in PHP |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 08-10-2001 17:49 |
Paranoid (IV) Inmate From: Sthlm, Sweden |
posted 08-13-2001 11:18
That version yes, it's a bit better now (only not posted at gurus yet) with detection of Opera 5 plus Win/mac/Linux/Unix os. |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 08-13-2001 20:47
That code is very inefficient. It would be much better like this: |
Paranoid (IV) Inmate From: Sthlm, Sweden |
posted 08-14-2001 16:09
I agree on the efficiency mrMax, that code I posted was just an example and not mine. quote:
|
Maniac (V) Lord Mad Scientist Sovereign of all the lands Ozone and just beyond that little green line over there... From: Stockholm, Sweden |
posted 08-23-2001 01:30
Hey Max! That's an awesome script, and one I'd like to borrow from you (slightly modified, I plan to use it inside my javascript code, and output the bits I need/want into Javascript format. I'll then call the external Javascript file, but instead of .JS i'll calla .PHP file full of code, which means it can get cached.) Say, do you think you'd be willing to let me re-distribute this script on my new site? Full credits of course, and backlinks, 'natch. I was just going to write my version of that script tomorrow, and now I don't *wanna*!!! You could be my first guest-zniplet! |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 08-23-2001 04:44 |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 08-23-2001 09:51
Doc, you can use & re-distirbute my code from above. Just e-mail me when you finish the "end-product", so that I can see my code in action, heh... |
Maniac (V) Lord Mad Scientist Sovereign of all the lands Ozone and just beyond that little green line over there... From: Stockholm, Sweden |
posted 08-23-2001 14:04
Coolness, This'll rock. I'm thinking offering two different browser detect methods, one for just the basic grouping of families, which will check things based on what functions they know (good for most jobs), and the other of full Browser detection, with details. (I'm thinking maybe of another between these, answering those two critical questions, "are you Mac?" and/or "are you Opera?" Both have minor tweaks needed to be made to avoid errors.) |
Maniac (V) Inmate From: Brisbane, Australia |
posted 08-25-2001 04:00
Hey DOC, I just found this huge list of possible HTTP_USER_AGENT strings that may come in handy for your progect: |
Maniac (V) Inmate From: Brisbane, Australia |
posted 08-25-2001 19:32
Actualy, I've been needing a script like this for a couple of sites I've been working on recently but I didn't think the scripts above were accurate enough or in some cases too specific. So I wrote my own: |
Maniac (V) Mad Scientist From: From:From: |
posted 09-03-2001 13:37
All of this code is making me diiiiizzzzzzy. |
Maniac (V) Lord Mad Scientist Sovereign of all the lands Ozone and just beyond that little green line over there... From: Stockholm, Sweden |
posted 09-05-2001 04:50
Yow, made me dizzy, too! Max, I used a SEVERELY trimmed down version of your script to check for older netscape, and include a different file in that case, here's the script I used... |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 09-05-2001 10:55
Doc, you should also exclude Opera and optionally Konqueror (part of KDE2 for *nix), because old divs will be added in those browsers with your current code. Also, Gecko refers to Mozilla/NN6 and it should be excluded like you already did. Anyway, the final code should look something like this: |