• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Locking cell size

byrdgirl13

New Member
How can I lock the height of a table cell? Just naming the height doesn't keep it from stretching when the cell next to it is taller. I want to limit the height of a cell so it won't get any taller - it's the cell with the updates on shafts of light.
 
Try this
Put your updates in a cell with a fixed height
Immediatly below it, put a cell filled to look like background.
The give the cell to the right rowspan=2
That way, when the rightward cell expands, it will affect the empty cell instead of the update cell.
 
You could surround the content you don't want to stretch with something like:

<div style="width:###px;height:###px;overflow:hidden;">
Content
</div>

(Changing the ###'s to the height and width)

Keep in mind that this only really works in Mozilla, Netscape 6 & 7, and IE 6. It also works in IE 5 for Macintosh. In Opera 6, it works rather sporadically. It doesn't work at all in Netscape 4.
 
I don't use the < div > tag....

and merickson - the cell to the right has rowspan="4" already - I've already tried making an extra cell and had the updates height set but it hasn't seemed to work. When the right cell stretches, all the other cells stretch, but the updates and logo cells stretch first - even though I've told each what height to be.

unless by "fixed height" you mean something other than putting height="###" or style="height:###px" in the <td> command?
oh and what does overflow:hidden do? :confused2
 
I don't use the < div > tag ... oh and what does overflow:hidden do?
I'm aware of this, that's why I suggested that you do.

Overflow controls what's done with content that goes beyond the set size. There's "visible", which just lets it keep going; there's "hidden", which cuts it off once it's reached the edge; and there's "scroll", which adds a little scrollbar so you can still see all the content, but it doesn't go beyond its borders.

As I said before, this is relatively new and only the most recent browsers support it.
 
Originally posted by Dusty
I'm aware of this, that's why I suggested that you do.

ah...point taken. what I mean is, I've never used it; I don't know how it works or what it does.
 
Back
Top