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

css inheritance 2

Status
Not open for further replies.

jimmyshoes

Programmer
Jun 1, 2008
132
GB
I am trying to work out the structure for my css pages
I am thinking of using the structure in the example below
In the example below, will Hi be rendered as 24 px in all browsers, and if I hadn't stipulated <td class = "largeFont"> then 14px
Code:
<style>
#main .someTable td { font-size : 14px}
,largeFont { font-size : 24px}
</style>

<div id="main">
<table class = "someTable">
<tr>
<td class = "largeFont">Hi</td>
</tr>
</table>
</div>
 
No, because #main .someTable td is more specific than .largeFont. See CSS: Specificity Wars among other places.




Greg
People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top