why can i not make the following TD smaller?
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td style="height: 15px !important; border: 1px solid black;">
<hr>
</td>
</tr>
</table>
when i load this example in DOM Inspector, computed value for TD height is 25px.
when the height is above 25, the computed value is correct. weird, no?
bug in style system?
- i5mast
- Posts: 56
- Joined: November 5th, 2002, 7:31 am
- Location: USA
i've tried specifying heigh and margin for HR. it didn't seem to help.
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td style="height: 15px !important; border: 1px solid black; padding: 0px">
<hr style="height: 1px !important; margin: 0px; border: 1px solid black;">
</td>
</tr>
</table>
DOM inspector still says the computed height for TD -> 25px; the height for HR is auto.
so how can specify the height for HR then?
thanks
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td style="height: 15px !important; border: 1px solid black; padding: 0px">
<hr style="height: 1px !important; margin: 0px; border: 1px solid black;">
</td>
</tr>
</table>
DOM inspector still says the computed height for TD -> 25px; the height for HR is auto.
so how can specify the height for HR then?
thanks
- bzbarsky
- Posts: 478
- Joined: November 5th, 2002, 1:36 pm
Setting height on <hr>
Looks like it'll always force that space around it (which makes sense in the context in which <hr> is meant to be used...)
- japh
- Posts: 8
- Joined: November 5th, 2002, 9:03 am
- Location: The Netherlands
This works for me in a stylesheet:
Code: Select all
hr {
border-style:none;
border-top:3px solid #D0E2F7;
height:3px;
}