It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Partner Sites
Board index Programming CSS Forum

load a style shee just for firefox

load a style shee just for firefox

Postby dazz_club on Sun Jun 17, 2007 8:33 pm

hi guys and the gals,

could anyone tell me , or show me the code to laod a style sheet just for firefox please??

cheers
User avatar
dazz_club
250+ Club
 
Posts: 313
Joined: Fri Jul 15, 2005 8:35 am
Location: Chester and Hull

Postby LucasZ21 on Tue Jun 19, 2007 4:11 pm

You would have to use javascript to detect what browser they are using.

I remember seeing something about it on this forum, somewhere...try asking about it in the Javascript forum.
Image
User avatar
LucasZ21
100+ Club
 
Posts: 195
Joined: Mon Feb 26, 2007 3:31 am
Location: Mansfield, OH

Postby mwa103 on Tue Jun 26, 2007 3:29 am

I know you can do it in JS, but I usually code in php so I use this method http://www.devppl.com/forum/re-if-ie-vp25498.html?highlight=#25498. That just shows IE, but usually you can get away with one stylesheet for ie and one for everybody else. Hope this helps.

-Mike
mwa103
100+ Club
 
Posts: 206
Joined: Mon Mar 07, 2005 11:55 pm

Postby ReFredzRate on Tue Jun 26, 2007 10:14 am

I think CSS is a great solution for making up your HTML coding, but the problem is, that it is displayed differently depending on which browser you use. For instance, if you use border lines of 1 px, IE would show the border on the outside and FF would show the border on the inside, making sure your table or div would not exceed the width you have given it. If you say you have a 800px wide table and border it in IE, the table would expand to 802px. That's basically the problem you have varying from browser to browser.

I think dazz_club has made me think about whether to use 1 stylesheet, or multiple. At the moment I think using only 1 sheet, you would still end up with different layouts depending on the browser you use. If you use multiple sheets depending on browser usage, you would be fine, since the layout would be the same, whether you use IE, Firefox, Opera, Safari, Netscape or whatever browser you would think of.

The best way is, in my humble opinion, to ask your clients for input on their browsers by using a PHP script. The script would use the browser version to choose from a list of style sheets, which would make you end up with 10 (or whatever) browsers, with 10 exactly identical layouts.

I think the script can be made with some very basic PHP. I'm not entirely sure whether JS would be suitable for this, since some internet users have that disabled. There's no way to disable PHP, so their browser would always have to respond to the question which browser is being used.
ReFredzRate
1000+ Club
 


Return to CSS Forum

Who is online

Users browsing this forum: No registered users and 0 guests