...

View Full Version : css for specific browsers



sudhakararaog
12-06-2009, 07:57 AM
hi

can anyone provide me with links with information on how to write
css code very specifically for chrome, opera and safari browsers

thanks

SB65
12-06-2009, 10:41 AM
I guess you could use javascript to detect the browser (http://www.quirksmode.org/js/detect.html) and hence apply styling.

Just curious, why would you want to apply different styling depending on the browser (other than IE of course)?

sudhakararaog
12-06-2009, 10:43 AM
thanks for replying

in the page i created the label elements of a form where no sitting properly only in chrome and opera but were fine in firefox and safari in ie there were issues so i fixed it by using a separate css for ie6 and 7

SB65
12-06-2009, 10:48 AM
n the page i created the label elements of a form where no sitting properly only in chrome and opera but were fine in firefox and safari in ie there were issues so i fixed it by using a separate css for ie6 and 7

Might be a simpler and more reliable fix than browser detection. Got a link to your page?

oesxyl
12-06-2009, 10:51 AM
thanks for replying

in the page i created the label elements of a form where no sitting properly only in chrome and opera but were fine in firefox and safari in ie there were issues so i fixed it by using a separate css for ie6 and 7
for ie you can use conditional comment:

http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx

best regards

MattF
12-06-2009, 11:56 AM
in the page i created the label elements of a form where no sitting properly only in chrome and opera but were fine in firefox and safari in ie there were issues so i fixed it by using a separate css for ie6 and 7

Get your code looking fine in Opera and it will usually work fine with any of the other proper browsers. If your layout looks off, then something isn't correct. Opera tends to be the most pedantic in that regard. Then use conditionals to get IE sorted and looking less broken.

SB65
12-06-2009, 12:51 PM
Sounds like the OP has fixed IE, but has issues with Chrome and Safari...

drhowarddrfine
12-06-2009, 02:56 PM
The OP has it backwards and it's obvious since, if he's trying to target modern browsers, he must be using incompetent IE as his test bed. One should NEVER have to correct valid markup for so many browsers if it's written correctly so I'd like (or hate) to see the page itself.

SB65
12-06-2009, 05:39 PM
One should NEVER have to correct valid markup for so many browsers if it's written correctly so I'd like (or hate) to see the page itself.

...which is what I suggested a few posts ago. If you read the posts the OP has his/her page working OK in FF and Safari and has employed conditional css for IE, quite reasonably. Being quite so vitriolic because somebody has (perhaps) made an error in their markup isn't very helpful, I'd venture.

linehand
12-06-2009, 06:38 PM
Oh man! I haven't been testing my pages in Chrome, Safari and Opera at all. Now you got me worried.

I do know that Chrome and Safari both use Webkit and Dreamweaver 4's 'live view' also uses Webkit. Of course that really does not mean they will render things exactly the same though.

I have just been assuming that if I get the page to work exactly the same in IE7, IE8, Firefox, and DWs live view with valid, strict html4.1, without any browser specific hacks or tweaks I stood a pretty solid chance of rendering correctly in those other browsers too (I am only using conditional comments to load a few fixes for IE6 - and one tiny tweak for IE7's handling of inline-blocks).

Plus our other similar sites which target a very similar demographic only get like 3 visits per month from those other browsers. Though really I don't want the page to be broken ever, even if it is only for 3 visitors per month.

*runs off to test in chrome, opera, and safari...

Apostropartheid
12-06-2009, 06:57 PM
drdr, there is massive disparity in how standards-compliant browsers display form controls. They're very different and sometimes the rules are completely arbitrary, and this is without OS changes. Don't instantly blame the OP.

jQuery has a nice function for this, maybe look into that.

drhowarddrfine
12-06-2009, 09:06 PM
drdr, there is massive disparity in how standards-compliant browsers display form controls. They're very different and sometimes the rules are completely arbitrary, and this is without OS changes. Don't instantly blame the OP.Not the issue.


jQuery has a nice function for this, maybe look into that.
Throwing javascript at a CSS issue is rarely the best solution and probably the worst.

Apostropartheid
12-07-2009, 07:58 PM
Not the issue.

You're right, I didn't read the post properly.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum