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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS

Status
Not open for further replies.

LeoLionHeart

Programmer
Apr 4, 2006
45
GB
Hi there I have a few questions on Cascading Style Sheets.

I didn't have a style sheet at first in my project but I have now referenced one, such as in the head part of my html:
Code:
<link rel="stylesheet" type="text/css" href="mainstyle.css">

In my mainstyle.css I have the following class:
Code:
.bodyText {
color: #666666;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: normal;
line-height: 16px;
}

I have now gone back to my aspx form and for my controls I have gone to the property CSSClass and set the property to bodytext. However, the text still seems to be Times Roman. Also, for the text which are not in a label/textbox and are only in a <td> how do I make the CSSClass equal to bodytext. Or do I set the class to bodytext.

Any help would be appreciated.

thanks

leo.
 
<table class=bodyText>
<tr> 'CSS Inherited
<td> 'CSS Inherited
<asp:TextBox cssClass=otherClass /> 'CSS Overridden
</td>
<td class=anotherClass> 'CSS Overridden
Hello
</td>
</tr>
<tr>
<td>
Hi There 'this text will be bodyText
</td>
</tr>
</table>

so as you can see you can apply the css to the whole table and override where needed.

in HTML use class=
in ASP controls use cssClass=

same thing, same file, just semantics.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top