Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TD hight 2

Status
Not open for further replies.

sjaakdelul

IS-IT--Management
Sep 19, 2002
43
NL
Hey,

I've this CSS (style sheet) in my head section in the html document index.html:

<STYLE TYPE=&quot;text/css&quot;>
body { background-image: url(Images/Background.jpg);
color: C6E2FF;
font-family: Staccato222 BT;
font-size: 12pt;
color:3567B2
}

h1 { color: 336699;
font-size: 36pt;
font-weight: bold;
text-align: center
}

h2 { color: 3567B2;
font-size: 12pt;
font-weight: 300;
font-style: normal;
line-height: normal;
text-align: center
}

h3 { color: 3567B2;
font-size: 12pt;
font-weight: strong
}
</STYLE>


When I typed:

<H1>Welcome at my personal test page!</H1> ... it displayed the text very well.

But now I've this code:

<TABLE width=100% border=0 cellpadding=3 cellspacing=2>
<TR>
<TD width=33% bgcolor=#C2D1E5><h2>Handy Links</h2></td>
<TD width=34% bgcolor=#C2D1E5 align=center><font color=&quot;3567B2&quot;>TEST</font></TD>
<TD width=33% bgcolor=#C2D1E5 align=center><font color=&quot;3567B2&quot;>Files</font></TD>
</TR>
</table>


The word TEST displays good, not to high, not to low...but 'Handy Links' displays very high in the cel.

What's the cause of that?

 
The <H..> is a &quot;block&quot; element. That means that it always has a margin under the &quot;block&quot; that occurs a blank space.

____________For example_______________

<H3>My Title</H3>My text ....

gives you:

My Title

My text ....

And NOT:

My Title
My text ....
______________________________________

So in your example the heigth of the left cel is one row for the text and one row for the blank space (margin).
So the middle and right cells follow the heigth of the left cell.
You can set the margin to zero in your style:

h2 {
color: 3567B2;
font-size: 12pt;
font-weight: 300;
font-style: normal;
line-height: normal;
text-align: center;
margin:0px
}

(By the way: your body_style has 2 times a color !!)

Hope this helps,
Erik

<-- My sport: Boomerang throwing !!
!! Many Happy Returns !! -->
 
thx, it worked very well :)

I've marked your post as a helpfull post :)
 
Very well put. -----------------------------------------------
These are endless galaxies which are yours.
You can journey to infinity
through the endless passages of the cosmos.
Even better. This all belongs to you.
This is your mind.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top