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

Table cells change size

P: n/a
I'm new to Dreamweaver (using MX 2004). I have a 2 row 3 column table.
I have set each column to 200 pixels. The second row I have merged
into one cell. When I enter text (or anything else) into the merged
cell the 3 columns above change pixel width. The pixel width still
says 200. But the pixel width shown in green above the columns it says
200(172)for example. It seems that the bracketed number is the size
the cell displays at rather than the specified 200, but I can't seem
to change this no matter how hard I try. My browser is IE6 so that
shouldn't be the problem.

I don't understand why the 3 top cells display perfectly, even with
the merged cell below empty, but then when text is entered they
change!

Can anyone help me??
Jul 23 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
In article <7c*************************@posting.google.com> ,
sa**********@xtra.co.nz enlightened us with...
I'm new to Dreamweaver (using MX 2004). I have a 2 row 3 column table.
I have set each column to 200 pixels. The second row I have merged
into one cell. When I enter text (or anything else) into the merged
cell the 3 columns above change pixel width.


They're supposed to. That's table behaviour.

If you don't want expansion when text goes over the borders, use a div with
proper CSS for overflow.

--
--
~kaeli~
Suicide is the most sincere form of self-criticism.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2

P: n/a
Thanks for that, but the text in the top 3 cells isn't overflowing. It
is the bottom merged cell that makes the top 3 cells change size. The
bottom cell does have wrapping text but it doesn't change the width of
the TABLE, just each of the top 3 CELLS.

I would have thought that the top cells' with is independant of what
is in the bottom cell providing the TABLE width remains the same.

So how would I get the top 3 cells to be exactly equal - the way it is
is making my website look dumb!

Appreciate any suggestion. Thanks.
Jul 23 '05 #3

P: n/a
In article <7c**************************@posting.google.com >,
sa**********@xtra.co.nz enlightened us with...
Thanks for that, but the text in the top 3 cells isn't overflowing. It
is the bottom merged cell that makes the top 3 cells change size. The
bottom cell does have wrapping text but it doesn't change the width of
the TABLE, just each of the top 3 CELLS.


Actually, I've found that to not be the case, as you have. The way the cells
expand seems to be very much dependent on the user agent implementation and
the doctype declaration (no doctype or a lack of a url in doctype throws
browsers into quirks mode). That is, it may look fine in MSIE with quirks
mode, but look awful in Firefox standard (and so on).

To solve this type of problem, when I don't want cells to change size when
cells beneath them expand, I don't put them in the same table. I put them
each in their own table inside another table.

---------------- <-- main table container specifies width
| content here | <--- in its own table with 100% width
----------------
| content here | <--- in its own table with 100% width
----------------

Tables really were never meant for layout. I still find them easier to work
with than CSS though for some things. I am slowly learning how to get away
from tables for layout, but I DO run into issues from time to time (mostly
with fluid, relatively positioned columns and text resizing pushing layers
out of place and with the whole expanding content thing).

You may want to consider checking out table-less layout with CSS. I don't
know if it would work for what you're doing. But it's worth learning. One of
my sites is done with pure CSS. The other I couldn't figure out how to get it
to work right without tables (when the user resized the text too big, the 3rd
column would wrap to the bottom, but using absolute positioning isn't usually
my style...). Try experimenting with it though. I plan on eventually being
able to drop the tables for layout for all my stuff.

I have found the info at this site to be very helpful to me.
This page in particular solved a PITA problem I was having.
http://www.quirksmode.org/index.html...centering.html

HTH
--
--
~kaeli~
Kill one man and you are a murderer. Kill millions and you
are a conqueror. Kill everyone and you are God.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #4

P: n/a
me
"SarahMarsden" <sa**********@xtra.co.nz> wrote in message
news:7c*************************@posting.google.co m...
I'm new to Dreamweaver (using MX 2004). I have a 2 row 3 column table.
I have set each column to 200 pixels. The second row I have merged
into one cell. When I enter text (or anything else) into the merged
cell the 3 columns above change pixel width. The pixel width still
says 200. But the pixel width shown in green above the columns it says
200(172)for example. It seems that the bracketed number is the size
the cell displays at rather than the specified 200, but I can't seem
to change this no matter how hard I try. My browser is IE6 so that
shouldn't be the problem.

I don't understand why the 3 top cells display perfectly, even with
the merged cell below empty, but then when text is entered they
change!

Can anyone help me??


In the following example each column is set to 200 pixels wide and the table
width is set to 600 pixels. This should fix your problem
Good Luck,
me

<table width="600" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="200">text</td>
<td width="200">text</td>
<td width="200">text</td>
</tr>
<tr>
<td colspan="3">text</td>
</tr>
</table>
Jul 23 '05 #5

P: n/a
Hi again! Thanks for that but the bottom cell isn't 'overflowing'. All
the content in all the cells fits well within the height and width. I
did swap the bottom table cell for a whole new table but it didn't
fix.

I did read another thread which said the pixel width and heights you
specify are only a 'suggestion' to the browser and that the browser is
free to do what it likes. If I move to layers instead of tables do I
get the exact control I am after?
Jul 23 '05 #6

P: n/a
In article <7c**************************@posting.google.com >,
sa**********@xtra.co.nz enlightened us with...
Hi again! Thanks for that but the bottom cell isn't 'overflowing'. All
the content in all the cells fits well within the height and width. I
did swap the bottom table cell for a whole new table but it didn't
fix.

Hrm.
Do you have an example URL?
You ARE using a doctype, right?
I did read another thread which said the pixel width and heights you
specify are only a 'suggestion' to the browser and that the browser is
free to do what it likes.
Very true. More with some browsers than others.
If I move to layers instead of tables do I
get the exact control I am after?


Yes.
But you run into other issues if you aren't careful. For example, MSIE box
model problems, overflow issues (divs, depending on the CSS, don't expand
like tables and content can overflow and look REALLY bad), cross-browser
issues, and so on.

If you have an example of what you're trying to do (URL), I might be able to
help more.

Unfortunately, the very nature of the web makes it difficult to accomodate
all browsers AND have it look exactly the same in all of them. In fact, it's
darn near impossible. There are a ton of user agents out there, though the
Big Two are MSIE and Firefox/Mozilla. But there is also Safari (Mac),
Konqueror (*nix), Opera, and many others. Unless you use Flash (which has its
own issues), you're not going to get the site to look exactly the same in all
of them. Some don't support Flash anyway.

Don't forget, many users have not-so-great vision, so they may want to
increase the text size or even have their own style sheet that they browse
with. Users might be browing with images off or even have a text browser
(Lynx). Unless you're doing an intranet app and know the browsers you're
supporting, you have to assume that at least 5% of your visitors are not
using MSIE (probably more these days).

Anything you do is purely suggestion to a user agent (browser), really.
Anyone can override your CSS (accessibility options in browsers). That's why
you need to design so that your site isn't totally FUBAR if the stylesheet is
not used. It may look like hell (or just be boring and black and white), but
it HAS to work without CSS.

--
--
~kaeli~
What if the Hokey Pokey IS what's it's all about?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #7

P: n/a
In article <7c**************************@posting.google.com >,
sa**********@xtra.co.nz enlightened us with...
Hi again! Thanks for that but the bottom cell isn't 'overflowing'. All
the content in all the cells fits well within the height and width. I
did swap the bottom table cell for a whole new table but it didn't
fix.


By the way, you DO know that previewing how it looks in dreamweaver isn't
necessarily how it will really look in the browser, right?

I re-read your OP and now I'm not sure if you meant the DW preview pane
looked funny or MSIE did.

Open MSIE and do File->Open to see the pages or do Preview In Browser from DW
(don't use a temp file -- uncheck that in preferences). Don't count on the
little design window to be perfectly accurate. In fact, it seriously screws
up with tables and floated divs. DW MX 6.0 crashes if you float divs, even.
They fixed that in more recent versions (MX 7.1, I think).

--
--
~kaeli~
Dancing cheek-to-cheek is really a form of floor play.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #8

P: n/a
me
"kaeli" <ti******@NOSPAM.comcast.net> wrote in message
news:MP************************@nntp.lucent.com...
In article <7c**************************@posting.google.com >,
sa**********@xtra.co.nz enlightened us with...
Hi again! Thanks for that but the bottom cell isn't 'overflowing'. All
the content in all the cells fits well within the height and width. I
did swap the bottom table cell for a whole new table but it didn't
fix.

By the way, you DO know that previewing how it looks in dreamweaver isn't
necessarily how it will really look in the browser, right?

I re-read your OP and now I'm not sure if you meant the DW preview pane
looked funny or MSIE did.

Open MSIE and do File->Open to see the pages or do Preview In Browser from

DW (don't use a temp file -- uncheck that in preferences). Don't count on the
little design window to be perfectly accurate. In fact, it seriously screws up with tables and floated divs. DW MX 6.0 crashes if you float divs, even. They fixed that in more recent versions (MX 7.1, I think).
~kaeli~


I have no problems with Preview In Browser from DW provided the browser is
IE. DW3 doesn't mind floating divs eithier. In fact I haven't ever had it
crash on me.
Signed,
me
Jul 23 '05 #9

P: n/a
me
"SarahMarsden" <sa**********@xtra.co.nz> wrote in message
news:7c**************************@posting.google.c om...
Hi again! Thanks for that but the bottom cell isn't 'overflowing'. All
the content in all the cells fits well within the height and width. I
did swap the bottom table cell for a whole new table but it didn't
fix.

I did read another thread which said the pixel width and heights you
specify are only a 'suggestion' to the browser and that the browser is
free to do what it likes. If I move to layers instead of tables do I
get the exact control I am after?


I gave you the answer in a prior post in this thread. If you want to control
column width you must also specify a table width that equals the total width
of all the columns.

Here's how:
Select the table in DW. Place your cursor in any table cell. Now click the
table tag in the status bar at the bottom left of the DW window. Now enter
600px (click the dropdown next to width and change percent to px) for the
table width in the properties box to set the table to an exact width of 600
pixels. You can control the size of tables and columns in IE provided the
user hasn't overridden these settings in IE's accessibility settings. All
bets are off as far as other browsers are concerned.
Good Luck,
me
Jul 23 '05 #10

P: n/a
In article <11*************@corp.supernews.com>, anonymous@_.com enlightened
us with...

I have no problems with Preview In Browser from DW provided the browser is
IE. DW3 doesn't mind floating divs eithier. In fact I haven't ever had it
crash on me.


DW3 is not the most commonly used version these days.
--
--
~kaeli~
Humpty Dumpty was pushed!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #11

P: n/a
me
"kaeli" <ti******@NOSPAM.comcast.net> wrote in message
news:MP************************@nntp.lucent.com...
In article <11*************@corp.supernews.com>, anonymous@_.com enlightened us with...

I have no problems with Preview In Browser from DW provided the browser is IE. DW3 doesn't mind floating divs eithier. In fact I haven't ever had it crash on me.


DW3 is not the most commonly used version these days.


No doubt, but it still works fine for me.
Signed,
me
Jul 23 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.