paul41598
06-05-2005, 11:28 AM
Is it practical to use this if statement if using firefox browser?
<if condition="is_browser('firefox')">
<insert rest of template code here>
<else />
<different template code here>
</if>
Basically what Im trying to do is use relative positioning to place some icons in my tables for CMPS. For example:
<if condition="is_browser('firefox')">
<div style="position:relative; width:190px; z-index:1; margin-bottom: -30px">
<div style="position:relative; top:-2px; left:5px; z-index:2">
<img src="online-icon.gif" width="33" height="33"></div>
<td class="$altbgclass">There Are Currently <phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests_homepage]</phrase> Browsing The Forums</td>
</tr>
<tr>
<td class="$bgclass"><span class="smallfont"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></span></td>
</tr></div>
<else />
<div style="position:relative; width:190px; z-index:1; margin-bottom: -30px">
<div style="position:relative; top:2px; left:5px; z-index:2">
<img src="/online-icon.gif" width="33" height="33"></div>
<td class="$altbgclass">There Are Currently <phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests_homepage]</phrase> Browsing The Forums</td>
</tr>
<tr>
<td class="$bgclass"><span class="smallfont"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></span></td>
</tr></div>
</if>
If I dont do this, the little "people" icon (in screenshot) gets out of place becuase I'm guessing both I.E and firefox interpret relative positioning differently. Of course, in this screenshot, its placed correctly
<if condition="is_browser('firefox')">
<insert rest of template code here>
<else />
<different template code here>
</if>
Basically what Im trying to do is use relative positioning to place some icons in my tables for CMPS. For example:
<if condition="is_browser('firefox')">
<div style="position:relative; width:190px; z-index:1; margin-bottom: -30px">
<div style="position:relative; top:-2px; left:5px; z-index:2">
<img src="online-icon.gif" width="33" height="33"></div>
<td class="$altbgclass">There Are Currently <phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests_homepage]</phrase> Browsing The Forums</td>
</tr>
<tr>
<td class="$bgclass"><span class="smallfont"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></span></td>
</tr></div>
<else />
<div style="position:relative; width:190px; z-index:1; margin-bottom: -30px">
<div style="position:relative; top:2px; left:5px; z-index:2">
<img src="/online-icon.gif" width="33" height="33"></div>
<td class="$altbgclass">There Are Currently <phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests_homepage]</phrase> Browsing The Forums</td>
</tr>
<tr>
<td class="$bgclass"><span class="smallfont"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></span></td>
</tr></div>
</if>
If I dont do this, the little "people" icon (in screenshot) gets out of place becuase I'm guessing both I.E and firefox interpret relative positioning differently. Of course, in this screenshot, its placed correctly