Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Table cell width fixed size

Reply
Thread Tools

Table cell width fixed size

 
 
Fabian Vilers
Guest
Posts: n/a
 
      04-24-2006
Hello all,

I need to draw a table with fixed size (height + width) cells. In any
case, the text should never expand the size of the cell.

Any help is appreciated,
Fabian
 
Reply With Quote
 
 
 
 
Roy Schestowitz
Guest
Posts: n/a
 
      04-24-2006
__/ [ Fabian Vilers ] on Monday 24 April 2006 09:49 \__

> Hello all,
>
> I need to draw a table with fixed size (height + width) cells. In any
> case, the text should never expand the size of the cell.
>
> Any help is appreciated,
> Fabian


<table width=VALUEH style="height: VALUEVpx;">

This table will have a fixed width VALUEH and a minimal height of VALUEV. It
would not makes sense for the height to be strictly forced, however. This
would lead to text disappearing and, mind you, tables cannot have scroll
bars. This is adverse to user's desire and will (just about any stalwart
advocate of standards would argue this). For this, you might wish to have a
look into iframes, which are scrollable and have fixed dimensions.

Hope it helps,

Roy

--
Roy S. Schestowitz, Ph.D. Candidate in Medical Biophysics
http://Schestowitz.com | SuSE Linux ¦ PGP-Key: 0x74572E8E
12:20pm up 1 day 21:17, 9 users, load average: 0.62, 0.59, 0.49
http://iuron.com - Open Source knowledge engine project
 
Reply With Quote
 
 
 
 
frederick
Guest
Posts: n/a
 
      04-24-2006
Fabian Vilers wrote:
> I need to draw a table with fixed size (height + width) cells. In any
> case, the text should never expand the size of the cell.


Why on Earth not? What if the text's too big to fit in the defined
cell size? What if the user makes use of a different size of text than
you do?


--
AGw.

 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      04-24-2006
Fabian Vilers wrote:

> I need to draw a table with fixed size (height + width) cells. In any
> case, the text should never expand the size of the cell.


Reanalyze the original problem, and you'll probably notice that you
don't need to create such problems.

If you insist on creating a problem with fixed-size cells, set the
height and width of each cell in CSS _and_ set
table-layout: fixed
for the table. Additionally, set the overflow property for the cells;
the value depends on whether you wish to have content hidden or let it
overflow outside the cell or have scroll bars in a cell.
 
Reply With Quote
 
Fabian Vilers
Guest
Posts: n/a
 
      04-24-2006
Jukka K. Korpela wrote:
> Fabian Vilers wrote:


All of the proposals you made was not correct.

First I must say the business design of the applications I need to work
on is really poor. Specifications are these, I must wrap the cell content.

I finally manage to find the solution by myself.

The content of the cell is enclosed inside a <div style="height: 123px;
width: 456px; overflow: hidden">

Anyway; thanks for your responses.
Fabian
 
Reply With Quote
 
Paul Watt
Guest
Posts: n/a
 
      04-24-2006

"Fabian Vilers" <> wrote in message
news:444cdbbb$0$436$ et.net...
> Jukka K. Korpela wrote:
>> Fabian Vilers wrote:

>
> All of the proposals you made was not correct.
>
> First I must say the business design of the applications I need to work on
> is really poor. Specifications are these, I must wrap the cell content.
>
> I finally manage to find the solution by myself.
>
> The content of the cell is enclosed inside a <div style="height: 123px;
> width: 456px; overflow: hidden">
>

If you re-read Jukka's post he said to do that


 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      04-24-2006
Paul Watt wrote:

>>The content of the cell is enclosed inside a <div style="height: 123px;
>>width: 456px; overflow: hidden">
>>

> If you re-read Jukka's post he said to do that


Well, something in that direction, in the "If you insist on creating a
problem" part, but I surely did not suggest creating additional problems
by using px dimensions, and I did not suggest using an artificial <div>
element, or using inline styles.

If the business design of an application is really poor, it should be
redesigned. We have no way of knowing whether the OP even tried asking
whether the original problem could be fixed. (He mentioned that he "must
wrap the cell content", which is something completely different and
might indicate that the business design has been misunderstood.)
 
Reply With Quote
 
Alan J. Flavell
Guest
Posts: n/a
 
      04-24-2006
On Mon, 24 Apr 2006, Fabian Vilers wrote:

> I need to draw a table with fixed size (height + width) cells. In any case,
> the text should never expand the size of the cell.


In case it wasn't already obvious, HTML has no way to work around a
fundamentally misconceived requirement.

> Any help is appreciated,


To get a usable result, first redefine the user requirement. No real
user would really demand that the required text should fail to fit in
its cell - and that's what you just asked for. Ergo, whoever
specified this requirement is not representative of a user. The next
step is yours, I guess.
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      04-24-2006
To further the education of mankind, Fabian Vilers
<> vouchsafed:

>> Fabian Vilers wrote:

>
> All of the proposals you made was not correct.
>
> First I must say the business design of the applications I need to
> work on is really poor. Specifications are these, I must wrap the cell
> content.
>
> I finally manage to find the solution by myself.
>
> The content of the cell is enclosed inside a <div style="height:
> 123px; width: 456px; overflow: hidden">


You must wrap the cell content and hide the overflow? -With all users'
varying text-sizes, etc., to deal with? Okay...

--
Neredbojias
Infinity has its limits.
 
Reply With Quote
 
Fabian Vilers
Guest
Posts: n/a
 
      04-25-2006
Neredbojias wrote:
> You must wrap the cell content and hide the overflow? -With all users'
> varying text-sizes, etc., to deal with? Okay...
>


I know this sucks
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! Fixed width table with a 100% width image in it is assuming theimages intrinsic size, although it does shrink the image satya.komatineni@gmail.com HTML 1 12-29-2007 08:32 PM
Using % on a table width, is it possible to get the width in pixel size? RMZ Javascript 2 08-01-2007 11:01 PM
Free Fixed-Width/Fixed-Pitch fonts? johnp HTML 4 05-23-2005 06:14 AM
Fixed layout width based on browser window width msswasstastic@aol.com HTML 11 01-28-2005 07:36 AM
Re: resized image in table extends table width to original image width Sean Jorden HTML 1 08-19-2003 08:59 AM



Advertisments