Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS [Netscape VS IE]

Status
Not open for further replies.

MaryChan

Programmer
Jan 4, 2001
9
SG
hi there,

I've just started using CSS in the development of my projects.

I've done a check to call the respective file when the detected browser is IE or NS.


<%
Dim browser

browser = Request.ServerVariables(&quot;HTTP_USER_AGENT&quot;)

If InStr(browser, &quot;IE&quot;) > 0 Then
%>
<LINK REL=StyleSheet HREF=&quot;styleIE.css&quot; Title=&quot;styleIE&quot;>
<% Else %>
<LINK REL=StyleSheet HREF=&quot;styleNS.css&quot; Title=&quot;styleNS&quot;>
<% End If %>



I've checked the source code and it's calling the correct files.

However, the CSS doesn't seem to work under NS.

Why is this so, and how can I do it in a way such that it'll work in both IE and NS??



.Mary
 
css actually works for nn, but not all features are supported. You'd check a css reference site, they have plenty of tables like &quot;what is supported in both nn and ie, only nn, only ie&quot; - i'm sorry i don't have the time to find you a reference but check the &quot;link&quot; part for this forum
 
You better use one CSS that consists of features supported by all browsers! (By the way, NN and IE are not the only ones on this Earth).
And you don't even need any scripts to determine what style to apply!

Andrew | starway@mail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top