In JavaScript use:
var agent=navigator.userAgent.toLowerCase();
var is_iphone = (agent.indexOf('iphone')!=-1);
if (is_iphone) { conditional code goes here }
In CSS/HTML use:
<!--#if expr="(${HTTP_USER_AGENT} = /iPhone/)"-->
<style type="text/css">
<!--
for the iPhone
-->
</style>
<!--#else -->
<style type="text/css">
<!--
not for iPhone
-->
</style>
<!--#endif -->
Other conditionals are:
[If !IE 6] will select IE 5, 5.5 and 7.[If lt IE 6] will select IE 5 and 5.5.[If lte IE 6] will select IE 5, 5.5 and 6.[If gt IE 6] will select IE 7 (and any later versions that may appear).[If gte IE 6] will select IE 6 and 7 (and later).


