css and table issues...

message from ndeklotz on 21 Jul 2004
I am trying to install a <h1> style property in a table cell that has a fixed
height of 23 pixels, but when I enter the <h1> </h1> tags it makes my cell
almost double in height.

The css info I have for h1=
h1 {font-family:arial; font-size:10px; color:#FFFFFF;}

I'm guessing this is defaulting to some type of setting I am not addressing,
(I'm just getting started with CSS) but don't know what, also do I need to
switch the h1 to td h1 since it is in a cell?

Thanks in advance for any help...
 
Robert Barnett replied to ndeklotz on 21 Jul 2004
Edit your CSS to zero out the margin and padding. For the H1 tag.

Robert
 
darrel replied to ndeklotz on 21 Jul 2004
The solution is to make sure your style for the H1 doesn't have a combined
text, padding, and margin height of more than 23 pixels.

Realize that this can easily be overridden by changing my font size in the
browser, and a table will expand to the width/height needed ti accinidate
the item inside it.

Well, as I said, also set padding and margin to zero and see if that helps.

However, if this is truly a header for a column or row in a table, then you
shoudl probably use actual table headers:

<table>
<tr>
<th>Item</th> <th>color</th>
</tr>
<tr>
<td>banana</td> <td>yellow</td>
</tr>
<tr>
<td>apple</td> <td>red</td>
</tr>
</table>

And then style the th tag:

th {styles}

-Darrel
 
ndeklotz replied to darrel on 22 Jul 2004
I've edited the margin and padding properties to 0px for h1 and everything works well except in Netscape 4.xx

Is this something I need to abandon to have it display properly in Netscape?
 
Murray *TMM* replied to ndeklotz on 22 Jul 2004
This should work fine in NN4x. I suspect that there is some other problem.
What is the URI to the page?
 

Archived message: css and table issues... (Macromedia Dreamweaver)