views:

10

answers:

1

Hey,

I am trying to trouble shoot a css issue that is appearing only in iphone browsers. I simply need to detect if the user is using an iphone, and if so, render a modified version of the div that is being affected.

I am happy to just call this modified version of the css div in the header as it will save having a second style sheet.

You used to be able to do it between browsers. It was especially good when rendering a IE6 fix.

Thanks for your help in advanced.

James

A: 
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
     // do something
}
Aaron Saunders