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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

spacing

Status
Not open for further replies.

marknav

Programmer
Sep 26, 2002
14
0
0
US
i am trying to create a page that is framed with 2 lines at top and at bottom
for ex:

this is header text
___________________

page
content
__________________
This is bottom text

i want that in my html page the space between each text
and its line will be zero.
i was working with HR, br, table, but i couldn't cancel the space. anyone have a solution??
 
Hi,

Why don't you use CSS to do this.

Make the table cell border for the header to have only a bottom border, and the table cell border for the footer to have only a top border. Make cellpadding and cellspacing="0" to get this to work.

Hope this helps!
greenjumpy.gif
NATE
design@spyderix-designz.com
 
How do i do that?

"Make the table cell border for the header to have only a bottom border, and the table cell border for the footer to have only a top border"
 
Hi,

Like this:
---------------[CUT LINE]---------------
<HTML>
<HEAD>
<STYLE TYPE=&quot;text/css&quot;>
td.bottom-border
{
border-color: #000000;
border-style: solid;
border-width: 0px 0px 1px 0px;
}
td.top-border
{
border-color: #000000;
border-style: solid;
border-width: 1px 0px 0px 0px;
}
</STYLE>
</HEAD>

<BODY>

<TABLE BORDER=&quot;0&quot; CELLPADDING=&quot;0&quot; CELLSPACING=&quot;0&quot; WIDTH=&quot;100%&quot; HEIGHT=&quot;100%&quot;>
<TR>
<TD CLASS=&quot;bottom-border&quot; HEIGHT=&quot;1&quot;>
Your header goes here!</TD>
</TR>

<TR>
<TD VALIGN=&quot;TOP&quot;>
<BR>Your content goes here!</TD>
</TR>

<TR>
<TD CLASS=&quot;top-border&quot; HEIGHT=&quot;1&quot;>
Your footer goes here!</TD>
</TR>
</TABLE>
</BODY>
</HTML>
---------------[CUT LINE]---------------

Read more about CSS at and
Hope this helps!
greenjumpy.gif
NATE
design@spyderix-designz.com
 
Thank u!!! I liked this solution very much!
Two more things:
1. I want to use a table with fixed width and height for the cells,
however the information in the cells is dynamic, and therefor - one cell become wider than the other or higher than the other.
Is there a way to make the cells all equal no matter what info is inside?
2. Do u know of a good website with tutorials for the css?
Thank you
 
Hi,

Answer-1: You can use fixed widths and height for the table cells if you wish, however if you have more info or have something in the cell that exceeds the set parameters then the table cell will adjust accordingly to fit all the content.

*Note how in my example above the height for the header and the footer is set to &quot;1&quot; yet the height is obviously not &quot;1&quot; I set it to that b/c I knew that the text would make it as big as it needed to be without it becoming too big and I didn't have the time to find out exactly how big the cell was.

So if you have more content than can fit into the cell then the cell will adjust. The only way to counter that would be to set the overflow to hidden, but that would be pointless seeing as how if you hide the info then why bother putting excess there in the first place.

Answer-2: I already posted a link to tutorials above. find out about CSS know everything that you can do with it, and then take their test to see how well you know it.

Hope this helps!
greenjumpy.gif
NATE
design@spyderix-designz.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top