Is there a way to restrict the size of a table and make it non-negotiable? I keep running into a problem with the width of the table stretching. I've tried setting the tables width, per cell, and tried using the max-width style.

I am in development of my work's website and during the process I have been checking its layout in 4 different browsers (Firefox, Chrome, Opera and IE) and at first I was only having problems on occasion with IE. Now depending on the computer I am having problems with tables stretching in Firefox too (The content section is fine here at work but on my laptop at home the table stretches).

[URL="http://metagraphics.net/home.html"] Metagraphics URL]

10-07-2010, 02:09 AM

Fang

Place the cells contents in a div with a defined width.

Tables are for data, not layout.

10-07-2010, 03:54 AM

sohguanh

Quote:

Tables are for data, not layout.

Actually I feel the above statement is not really true. There are a group of ppl who says all positioning is CSS. But there will also be another group of ppl who prefer to play around with table tags and attributes to achieve the layout.

:eek: WOW, what an eye opener for me! I took a web design class in community college about 10 years ago to get me by and I hadn't done much with it; just personal sites for my art (and my boss only has Dreamweaver MX to boot)... When I took the class CSS was more of a side note than a building tool! I've heard that CSS was so cool but all I heard in my head was "blah blah, CSS rocks for changing the color of my header text, and look what I can do with my links." I hadn't realized how dynamic this could be... and now with animation properties of CSS3!

Now that the door is open I want more! I've been looking around the web a bit and been checking out peoples source and CSS but can't figure out how the designers are assigning div location of buttons/rollovers/images since I'm not seeing height properties. Are they using image spacers (A no no per seybold)?

Thank you for your help Fang. I loved the comic strips too. It looks like its time for an update on the website!

10-08-2010, 03:32 PM

Fang

Quote:

but can't figure out how the designers are assigning div location of buttons/rollovers/images since I'm not seeing height properties

Can you give an example?

10-08-2010, 03:43 PM

YohimbeArts

I stand corrected. As I am looking further into it I am seeing the height properties are located under the CSS... I was looking for it with the div tags. So, if I'm understanding this correctly I'd want to use a wrapper for the over all size, then separate bulk areas and then break up tabs or whatever within bulk areas.

Why can't tables be locked? Is it browser compatibility?

01-06-2011, 11:21 AM

Designer525

help

so i put the div on my table and it stopped the table from expanding but the type that is echo into the table is still running out of the table please help here is my code.

Using table-layout: fixed in the <table> tag, the table will equally divide its width between the columns, but then specifying <col> tags and widths within them you can control the exact sizes you want. You will notice I didn't specify a width for one of the <col> tags, that tag will get the remaining width after the other two columns are sized, this is useful if you have a table layout that stretches the full length of the screen.

Note: This only works for widths, the height is determined by the content of the cells.

01-06-2011, 01:59 PM

Designer525

hey

the table isnt expanding any I was able to get that to stop, however the type that is in the echo session that I have within the table, its text is not wraping so its going outside the table instead of staying in it.

01-07-2011, 09:29 AM

J0106Preston

I usually use a height and width attribute in my <td> tags when doing email ads. That keeps it from stretching when you look at it in Liveview, although Dreamweaver CS5 will still display things weird sometimes when you're looking at it in normal.