Wed, 2004-04-28 14:55
Say I have a style:
.myTable TD{ padding: 1px 3px 1px 3px; border-bottom: 1px solid ButtonFace; border-right-color: ButtonFace; border-right-style: solid; border-right-width: 1px; border-left-color: ButtonFace; border-left-style: solid; border-left-width: 1px; background-color: #FCFCFC; font-family:Arial, sans-serif; color:black; font-size:8pt; font-weight: normal; }
and I wish to apply another style to a TD element within the same table.
<td class="classForThisTd" ></td>
The assigned class is not being rendered. Does anyone know how to override the inherited style or possible suggest a way to accomplish this.
Thank you,
FI
Wed, 2004-04-28 15:48
#1
Overriding inherited styles
Hi
In the style, you could try adding !important to the end of the style, e.g.
height:100px !important;
Or you could try putting an id in the cell and setting the style on the id (Id overrides other styling), e.g.
<td id="tryme">
Trevor
Wed, 2004-04-28 19:00
#2
Overriding inherited styles
Can you post the actual code if the above does not work? It could be something as tiny as missing one capital letter...
Thu, 2004-05-06 13:06
#3
Overriding inherited styles
This is what I did, I wrapped the my target td within another table and assigned a style to it:
<table class="ScrollerTable" cellspacing="0" cellpadding="0">
I then created:
.ScrollerTable TD{ font-family:Arial, sans-serif; color:black; font-size:8pt; font-weight: normal; text-align: right; background-color: #EAEAEA; padding-left: 2px; padding-right: 3px; padding-top: 5px; padding-bottom:3px; border-bottom: 0px solid ButtonFace; border-right-color: ButtonFace; border-right-style: solid; border-right-width: 0px; border-left-color: ButtonFace; border-left-style: solid; border-left-width: 0px; }
This solved my problems, thank you all for the time.
FI