Jump to content

Recommended Posts

what code do i right to use a css file for opera ,safari and chrome specifically

 

eg this is how i load a css file if someone is viewing my site in ie 6

 

<!--[if IE 6]>

<link href="templates/aaaaa/css/ie6only.css" type="text/css" rel="stylesheet" />

<![endif]-->

Link to comment
https://forums.phpfreaks.com/topic/167260-load-a-different-css-file-for-browsers/
Share on other sites

more importantly, what are you trying to do? you shouldn't need browser specific CSS. usually you can accomplish the same thing with some CSS tweaks/tricks.

 

last resort, you could make it look good in those other browsers, and have an IE specific stylesheet to fix it for IE

i don't know any specific browser hacks for those browsers, but there are two other options i know of:

 

1 - use PHP's get_browser() to figure out what they use

2 - use JavaScript to figure out what they use and load in styles after the dom loads

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.