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

overriding Contextual Style 1

Status
Not open for further replies.

joelmac

Programmer
Jun 4, 2002
92
CA
Hey there,

What I'm doing is simple, but I seem to be missing something. I have this style:

Code:
table.tblBlock tbody td{
	padding:10px;
}
table.tblBlock tbody td table tbody td{
	padding:2px;
}

td.dataGridCell{
	padding:40px;
}

I want dataGridCell to override anything else. So a cell with a class of "dataGridCell", no matter where it is, to have 40 px of padding.

Here's how I'm using it:

Code:
<table class="tblBlock" style="">
	<TR>
		<TD>
			<table width="758" cellspacing="0" style="">
				<tr height="21px">
					<td class="dataGridCell" width="71">xxxx#</td>
					<td class="dataGridCell" width="71">xxxx#</td>
					<td class="dataGridCell" width="76">xxxxDate</td>
					<td class="dataGridCell" width="121">xxxx Serial#</td>
					<td class="dataGridCell" width="86">xxxxType</td>
					<td class="dataGridCell" width="101">Status</td>
					<td class="dataGridCell" width="76">Submitted Date</td>
					<td class="dataGridCell">Actions</td>
				</tr>
			</table>
		</TD>
	</TR>
</table>

All the cells have a padding of 2px. I don't want to make a new class "table.tblBlock tbody td table tbody td.dataGridCell" because I want to use it in many places with many different contexts. Any ideas?

Thanks,

________________________
JoelMac
 
If I remember correctly you can use:

td.dataGridCell{
padding:40px !important;
}

and that should overrude everything else.

Hope this helps

Luis Torres
 
Thank you very much, that works great!

________________________
JoelMac
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top