Click to See Complete Forum and Search --> : table alignment


finnleyjane
07-24-2008, 02:04 AM
this is, i know, a common problem with tables. my pages are built with a simple table layout (3 tables total). the first two pages align perfectly, the third jumps. the jumping is different depending on the browser (i've only looked at it in safari, firefox, and opera, i'm on a mac). i'd greatly appreciate any input from the forum as to a possible fix. i know the endless debate about using tables. i use them in a simplified manner, i like using them, and usually all is well except for the few times i've devoted way too much time on a page which has a "jump". having said that i'm open to suggestion if there is a better way to achieve a SOLID layout which won't move around when content is inserted. i'm using css but i'm relatively new to the game and may be doing it incorrectly. here's the URL:

http://www.joycejohnson.com/throw/jjohnson/jjohnson.html

please click on the top/left image only (the white/yellow/red pot) and from there follow the links to the larger image. three pages in all.
many thanks. jj

JeremyA
07-24-2008, 02:47 PM
Well im not sure this is what you want...

you could insert div's into each content containing cell of the table and set the overflow to scroll thus if an image or content is larger than the space provided it will scroll accordingly.

also, make sure all height and width values are defined.

-Jeremy

finnleyjane
07-24-2008, 02:59 PM
thanks jeremy. i'm not sure either. the odd thing is the content is never larger than the cells. height and width values are defined in css style sheet. my div tag experience is very limited (taking my first programming class in a few weeks). i've read that divs are much better for layout than tables. i like using tables but for this one problem. given that the content (mostly images) does not exceed cell h/w would you still recommend using div and setting overflow? thanks much for your advice. jj

finnleyjane
07-24-2008, 03:00 PM
one more thing...if i'm using css to define height and width should i still include these values in html?

JeremyA
07-24-2008, 03:11 PM
Hehe.
Well tables will stretch with the content (unlike divs) thus you will never visibly see the content larger than the table/cell. Although this stretching may cause you some formatting errors. As long as you're sure the content will fit within the given height and width then you're fine.

divs give you more flexibility on look and the code is less strenuous allowing search engines to sweep through more of your site's content and less of your sites code.

i started on tables as well, i had to pry myself away from them :)
actually i still use tables here and there for minor formatting.

If you find your tables begin stretching and screwing with your format then i would cut down the content or add in the divs. Also you may want to take into consideration accessibility, many elderly people have their font cranked up and this may also mess with the format a bit.

Yes, i would define them both in HTML and the CSS.