By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,487 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,487 IT Pros & Developers. It's quick & easy.

help please!

P: n/a
hello,
can somebody check my old post please and tell me if i'm right so i can
change width and height of the table.
the subject was SUBJECT:style="TABLE-LAYOUT:fixed;" ???
on 05.02.2004.
thank you.
Jul 20 '05 #1
Share this Question
Share on Google+
13 Replies


P: n/a
riki wrote on 09 feb 2004 in comp.infosystems.www.authoring.stylesheets:
can somebody check my old post please and tell me if i'm right so i can
change width and height of the table.
the subject was SUBJECT:style="TABLE-LAYOUT:fixed;" ???
on 05.02.2004.


You should add a link, so that people can reread it, Riki:

<http://groups.google.com/groups?selm=bvtq8e%24buq%241%40ls219.htnet.hr>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #2

P: n/a
riki wrote:
hello,
can somebody check my old post please and tell me if i'm right so i
can change width and height of the table.
the subject was SUBJECT:style="TABLE-LAYOUT:fixed;" ???
on 05.02.2004.


Wot? You mean this one?
http://groups.google.com/groups?th=303c77831a6f2486

[ I do not understand your question ]

--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology
Jul 20 '05 #3

P: n/a
sorry, didn't know about the link...
i was wondering if the width and height of the table increases when i put
cellspacing=x...
i.e. first i fix height=100 and then cellspacing=2...
what's my table height in the end if i have 5 rows???
is it 20+20+20+20+20=100px
or is it 2+20+2+20+2+20+2+20+2+20+2=112px
Jul 20 '05 #4

P: n/a
"riki" <ri******@hotmail.com> wrote:
sorry, didn't know about the link...
i was wondering if the width and height of the table increases when i put
cellspacing=x...
i.e. first i fix height=100 and then cellspacing=2...
what's my table height in the end if i have 5 rows???
is it 20+20+20+20+20=100px
or is it 2+20+2+20+2+20+2+20+2+20+2=112px


Neither. It's
2 + R1 + 2 + R2 + 2 + R3 + 2 + R4 + 2 + R5 + 2 = 100

Where R1 - R6 may or may not be the same depending on the content of
those cells. (Always assuming that the contents fit within the
specified height.)

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #5

P: n/a

"Steve Pugh" <st***@pugh.net> wrote in message
news:0t********************************@4ax.com...
"riki" <ri******@hotmail.com> wrote:
sorry, didn't know about the link...
i was wondering if the width and height of the table increases when i put
cellspacing=x...
i.e. first i fix height=100 and then cellspacing=2...
what's my table height in the end if i have 5 rows???
is it 20+20+20+20+20=100px
or is it 2+20+2+20+2+20+2+20+2+20+2=112px


Neither. It's
2 + R1 + 2 + R2 + 2 + R3 + 2 + R4 + 2 + R5 + 2 = 100

Where R1 - R6 may or may not be the same depending on the content of
those cells. (Always assuming that the contents fit within the
specified height.)

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>

Jul 20 '05 #6

P: n/a
but i've tried increasing cellspacing of one table while other table
remained as it were...then i noticed that first table increased height for
this cellspacing, even height of both tables were fixed to same value...
try fixing width or height of two tables, and then to first one put
cellspacing=2 and to other one cellspacing=10... you'll see that height and
width wan't be the same even dimensions are fixed to same value...
Jul 20 '05 #7

P: n/a
copy paste this source...you could see that 2'nd table has greater height
than 1'st and both have height="120"...
-------------------------------------------------------------------

<table width="300" height="120" cellspacing="2" bgcolor="gray">
<tr>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
</tr>
<tr>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
</tr>
<tr>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
</tr>
<tr>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
</tr>
<tr>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
</tr>
</table>

<table width="300" height="120" cellspacing="15" bgcolor="gray">
<tr>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
</tr>
<tr>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
</tr>
<tr>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
</tr>
<tr>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
</tr>
<tr>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
</tr>
</table>

Jul 20 '05 #8

P: n/a
"riki" <ri******@hotmail.com> wrote:
copy paste this source...you could see that 2'nd table has greater height
than 1'st and both have height="120"...
Of course it does.

If (Sum of all cellspacing) + (sum of all cell heights) <> table
height, then one of the values has to be ignored. The table height is
most likely to be ignored.
<table width="300" height="120" cellspacing="2" bgcolor="gray">
<tr>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>
6 x 2 + 5 x 40 = 212, which is not 120.
<table width="300" height="120" cellspacing="15" bgcolor="gray">
<tr>
<td width="100" height="40" bgcolor="#c0c0c0">x</td>


6 x 15 + 5 x 40 = 290, which is also not 120.

Neither of the table is being displayed at 120px high.

Try it again with no heights on the cells. The first table will now be
120px tall. The second will be taller as the content of the table
cells needs about 22px to be displayed, hence
6 x 15 + 5 x 22 = 200px.

But what has this got to do with CSS? All your styling here is being
done via HTML.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #9

P: n/a
"riki" <ri******@hotmail.com> wrote:
but
What are you replying to?
i've tried increasing cellspacing of one table while other table
remained as it were...then i noticed that first table increased height for
this cellspacing, even height of both tables were fixed to same value...
try fixing width or height of two tables, and then to first one put
cellspacing=2 and to other one cellspacing=10... you'll see that height and
width wan't be the same even dimensions are fixed to same value...


The height of the table can be ignored if the content needs more
height.

"CSS2 does not specify rendering when the specified table height
differs from the content height, in particular whether content height
should override specified height;"

http://www.w3.org/TR/CSS2/tables.html#height-layout

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #10

P: n/a
Steve Pugh <st***@pugh.net> wrote:
"riki" <ri******@hotmail.com> wrote:
<table width="300" height="120" cellspacing="2" bgcolor="gray">

But what has this got to do with CSS? All your styling here is being
done via HTML.


And non-standard HTML at that. There is no height attribute for the
table elemnt in standard HTML.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #11

P: n/a
yes i know that...that was just an example...all i want to know was this: if
i use style="TABLE-LAYOUT:fixed;" how should i fix table dimensions...
should i calculate TD's+cellspacing between them or just sum of all TD's???
Jul 20 '05 #12

P: n/a
"riki" <ri******@hotmail.com> wrote:
yes i know that...that was just an example...
Try to post useful examples in future.
all i want to know was this: if
i use style="TABLE-LAYOUT:fixed;" how should i fix table dimensions...
table-layout: fixed; only fixes the widths of columns, it does nothing
at all about the heights of rows.
should i calculate TD's+cellspacing between them or just sum of all TD's???


TDs + cellspacing (or border-spacing in CSS terms)

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #13

P: n/a
thank you Steve, this is what i want to know...
Jul 20 '05 #14

This discussion thread is closed

Replies have been disabled for this discussion.