This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > April 2004 > Fixed cellsize





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Fixed cellsize
Bengan

2004-04-21, 2:53 pm

How can I make a table that dowsn´t change size?
I want to keep the size fixed no mather what´s happening.

//Bengan


Barry Pearson

2004-04-21, 2:53 pm

Bengan wrote:
> How can I make a table that dowsn´t change size?
> I want to keep the size fixed no mather what´s happening.


You can't do this just by trying to control the table. They defy full control.

Do it by controlling the content of the cells, and let the table then adapt to
those contents. For example, wrap up the entire content of a problem cell in a
div, then control the div using CSS:

HTML:
<td>
<div class="something">
Your stuff here
</div>
</td>

CSS:
div.something {
width: 200px;
height: 300px;
overflow: auto;
}

You may also have just one of width or height. You may have { overflow:
hidden }, but that would hide any content that won't fit. "auto" gives one or
more scrollbars *if you need them*.

The table cell will see the 200px by 300px, not the details of "your stuff
here", and wrap to it. Better than spacer-GIFs! (Except that spacer-GIFs work
if the user isn't using CSS).

You may also choose to control the width of the table directly, of course.
Normally, this wouldn't stop the changes to the content blowing the table up.
But once you control the content like the above, your control of the table
will be more effective.

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews