Can i make a table auto fill a page with rows

Cabbit

macrumors 68020
Original poster
Jan 30, 2006
2,128
1
Scotland
Heya folks i am wanting to create a application that looks desktop like, it has a iTunes like interface and predominantly table based content. What i would like to do is have the table element fill the entire page with empty tr elements to continue the banding until the bottom of the container div.

How would i go about making the table continue so it looks more like a something like iTunes/Sequal pro?
 

Attachments

jared_kipe

macrumors 68030
Dec 8, 2003
2,967
1
Seattle
Assuming the container has a pre determined size, you could just fill the table with enough empty rows to fill that size. This could be done client side with Javascript (jQuery), especially since JS can find out how big that container is dynamically and generate more empty rows to fill it.

It could be done in whatever language you're building the site with as well, but there might be complications down the line if you decide to change the size of the container.
 

elppa

macrumors 68040
Nov 26, 2003
3,230
108
If each row is the same height then I would be tempted to make a background image of one odd and one even row and tile it behind the table.

If the rows are not always the same height then I would probably use the same background image on an element whose height is calculated dynamically to fill the remainder of the page.

The only trick would be ensuring the last real row and the first fake row on the background image join up.

The reason I wouldn't choose to add/remove extra rows is because it involves excessive DOM manipulation every time the page is resized.
 

jared_kipe

macrumors 68030
Dec 8, 2003
2,967
1
Seattle
If each row is the same height then I would be tempted to make a background image of one odd and one even row and tile it behind the table.

If the rows are not always the same height then I would probably use the same background image on an element whose height is calculated dynamically to fill the remainder of the page.

The only trick would be ensuring the last real row and the first fake row on the background image join up.

The reason I wouldn't choose to add/remove extra rows is because it involves excessive DOM manipulation every time the page is resized.
The background image is a really good idea actually, don't color the rows at all, just let the background repeat in x and y. (unless you select a row, then you can highlight it)

EDIT: For the record, looking at the thumbnail I thought there was a set hight of the content (where that grey bar is on the left) So I didn't think filling it out would be so bad.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.