Click to See Complete Forum and Search --> : h1 problem


dizyn
07-26-2007, 11:52 AM
I we see its result we get so much top and bottom space just this code:

code:

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#00FFFF"><h1>Hello</h1></td>
</tr>
</table>

I want to remove top and bottom space.

any help

OctoberWind
07-26-2007, 02:05 PM
try adding this to the <head>:
<style type="text/css">
<!--
h1 {line-height:1.5em;}
-->
</style>

By adjusting the line-height, you can cut out some of the natural padding that's designed into the h1 tag. In reverse, you can also add extra space above and below the text. 1.4em starts to cut off the serifs, so I wouldn't go shorter than 1.5em. You might be able to cut it down a notch more with a sans-serif such as Arial, Tahoma, or Helvetica.

ray326
07-26-2007, 10:06 PM
The table is totally unnecessary. Just style the h1 to look like you want it to look.

foxbeefly
07-27-2007, 03:13 AM
Yep: set your style to something like:

h1 { margin-top: 0; margin-bottom: 0; background-color: #00FFFF }