4 replies [Last post]
gardanni
Offline
newbie
Last seen: 15 years 26 weeks ago
Joined: 2005-11-04
Posts: 3
Points: 0

I'm not a complete newbie, but certainly not an expert.

I have a layout that calls for table cells that are 50% filled with an certain color, from the top down.

I created a one-pixel sample of that color and tried the basic HTML of specifying height of the image as 50%. I also tried using a nested table with appropriate background colors, experimenting by setting all combinations of table height, row height and cell height to 50%. But my browsers are ignoring all of these. Will I have more success in CSS? What is the best way to proceed through CSS?

Many thanks.

Dan

briski
briski's picture
Offline
Elder
London
Last seen: 8 years 47 weeks ago
London
Timezone: GMT+1
Joined: 2004-02-16
Posts: 1066
Points: 0

50% cell height?

Is the table cell a fixed height or variable?

gardanni
Offline
newbie
Last seen: 15 years 26 weeks ago
Joined: 2005-11-04
Posts: 3
Points: 0

50% cell height?

The row heights are variable. Otherwise it'd be easy!

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 7 years 10 weeks ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

50% cell height?

It's still easy. Just use a background image that is tall enough to cover the largest row you'll encounter split in half with the colors desired. Then position it 50% down

gardanni
Offline
newbie
Last seen: 15 years 26 weeks ago
Joined: 2005-11-04
Posts: 3
Points: 0

50% cell height?

CSS rocks, and so do you, wolfcry! Thank you very much.