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!

Printing blank table rows 1

Status
Not open for further replies.

carlg

Programmer
Jun 23, 2004
88
US
I have a table that has 5 rows

Only the 1st row has data.

But, I still want to see the border for all of the empty cells.

Seems like only the cells that contain data are being displayed.

What if I want to display all 5 rows even if the last 4 rows are empty?


Thanks

Carl


I have something like this

Code:
<TABLE BORDER="2">
<TR><TD>dfdfdfdf</TD><TD>dfdsfdsfsd</TD></TR>
<TR><TD></TD><TD></TD></TR>
<TR><TD></TD><TD></TD></TR>
<TR><TD></TD><TD></TD></TR>
<TR><TD></TD><TD></TD></TR>
</TABLE>

 
try putting a height and width attribute on the empty cells and filling them with a &nbsp; character.


A possible solution would be to use CSS to set the height and width for the <td>'s


Code:
table td {
 width:30px;
 height:20px;
}

That may throw up other problems when you have data in the table though.

<honk>*:O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Earl & Thompson Marketing - Marketing Agency Services in Gloucestershire
 
The easiest thing to do would be to put a non-breaking space in the empty cells.

<TR><TD>&nbsp;</TD><TD>&nbsp;</TD></TR>
 
Oops...sorry Foamcow, I didn't read the first sentence of your post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top