SamDZ
SamDZ

Reputation: 79

Apply css properties depending on which browser is used

I want to apply different css properties depending on which browser is used, If browser is Firefox version 4.0 use this code:

.lastnews-Col {
    height: 360px;
    margin-bottom: 5px;
    overflow: hidden;
    padding: 5px;
    position: relative;
}

If browser is not Firefox version 4.0 apply this css property :

.lastnews-Col {
    height: 350px;
    margin-bottom: 5px;
    overflow: hidden;   
}

How can this be done?

Upvotes: 1

Views: 2667

Answers (2)

seler
seler

Reputation: 9213

Use firefox 4 specific selector: -moz-any()
http://jsfiddle.net/seler/yuKxW/1/

Upvotes: 4

cvsguimaraes
cvsguimaraes

Reputation: 13260

Use something like CSS Browser Selector/.

Upvotes: 1

Related Questions