Link to home
Start Free TrialLog in
Avatar of grchris
grchris

asked on

CSS styles - how to??

I'd like to know how to apply CSS styles to a tag such as "TD" with a few conditions. EG - How to make the stylesheet overide any other size settings that may be in place. Also if the browser is incompatible with stylesheets to enable the html fontsizes to exist also????
Avatar of ruperts
ruperts

There are a couple of reference site which I use, but I'm not sure if you can override the <FONT> statement using CSS.

http://msdn.microsoft.com/workshop/author/css/reference/attributes.asp#ie40_cssref

http://builder.cnet.com/Authoring/CSS/table.html

ASKER CERTIFIED SOLUTION
Avatar of Batalf
Batalf
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
create a style sheet first

<STYLE>
 <!--
      TD.ITEM      {
              vertical-align: top;
              background-color: #FFFBF0;
            }

      TD.COUNTER     {
                   padding: 0mm;
                   background-color: #0000FF;
                   font-family:"Courier New";
                   font-size:11pt;
                                       font-weight: bold;
                   color:#00FF00;
                    }
-->
</STYLE>

and in HTML file


<TABLE>
 <TR>
  <TD CLASS=ITEM></TD>
  <TD CLASS=COUNTER></TD>
 </TR>

You just have to specify the style to apply to the tag, and that will overide the default style for that tag.

as for the conditions, let say netscape and ie, unless you have a program in the serverside to send the right style sheet to the user.  
Avatar of grchris

ASKER

Batalf? thanks for the answer, ermm can css style sheets contain code?
 EG. If netscape then
 something
else if ie then
something else
end if

Otherwise I suppose I could set a session variable to pick what stylesheet to use on each page....