|
Posted by Brian Robertson on 06/26/07 18:25
Jonathan N. Little wrote:
> Brian Robertson wrote:
>> I am doing something wrong on a style sheet. I want some space before
>> the text in the cells of a table, so I used this:
>>
>> td {
>> height:19px;
>> background-color: rgb(248,239,182);
>> margin-left: 3;
>> }
>>
>> When viewed in my editor the spaces are there as desired, but once
>> viewed with a browser they are gone.
>>
>
> Margin is outside the element padding is inside the element, therefore
> if your want to add space to the text *inside* the TD then the property
> for the TD should be padding. Also your must use *units* for almost all
> length properties "margin-left: 3;" is invalid, best to use units
> proportional with respect to the font
>
> td { height: 1.5em; padding-left: .25em; }
>
Thanks!
[Back to original message]
|