1

I have a responsive site that I'm developing where I'm using a image slider as the header that works great and responds great in Android, iPhone with both vertical and landscape views. According to an online testing simulator; it even renders great in Blackberry Torch. HOWEVER, in Blackberry Curve - the image slider seems to break the layout.

Is there any way or any such thing as a code that will detect which device I'm using and hide an element accordingly? Like a BlackBerry Curve conditional statement / media query something?

Any suggestions?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Dr Upvote
  • 8,023
  • 24
  • 91
  • 204

1 Answers1

1

I suggest you check the user-agent string sent up by the phones browser to identify the handset model and return the most appropriate HTML.

For the format of the string please see: How to detect the BlackBerry Browser.

Please also see Auto detect mobile browser (via user-agent?) as to how you may use the user-agent in a conditional statement/configuration in many platforms/languages.

I think media queries support came in BB OS5 and the phone you mentioned (Curve, depending on the model) can have an earlier OS version. Also I don't think any media queries exist that will distinguish based on a phones model number.

Community
  • 1
  • 1
Ray Vahey
  • 3,065
  • 1
  • 24
  • 25