View Single Post
Old 09-16-2011, 10:36 AM   PM User | #1
LearningCoder
Regular Coder

 
LearningCoder's Avatar
 
Join Date: Jan 2011
Location: The Pleiades
Posts: 849
Thanks: 67
Thanked 28 Times in 28 Posts
LearningCoder is an unknown quantity at this point
Changing CSS properties depending on browser.

Hi I have been searching google for about an hour now and found a snippet which is said to work. I want to change a property of #nav depending on the users browser being Opera. I'd like to do this with jQuery but this code isn't working and all the examples show this to be the correct way to achieve this.

Here's the code:

Code:
if( $.browser.opera ) {
     $('#nav').css({'padding-top' : '10px'});
}
Any information or links will be appreciated,

Regards,

LC.
LearningCoder is offline   Reply With Quote