Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML tables

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi all,
I have a question for you.
My webpage uses tables. Well, actually it's nested tables. But I don't think that nesting is a problem. But what seems to be a problem is that whenever I resize the browser's window, the table's layout seems to change: text wraps, images jump under each other and so on. How can I avoid this? If anyone of you could post some example on that, or address me to good tutorials which cover this topic, I'd really appreciate that.
Thank you.
Best regards.
 
Nested tables is probably not the best approach for layout even though it is used in virtually every site you come accross. The reason for the jumping around is due to the fact that you probably didnt define height or widths in your tables and cells. To stop the dancing around and to get your page to load a lot faster define as many height and widths as you can in your tables. Using percentage widths will always give you this problem, use pixel widths to keep everything in a fixed place. Use percentages if you want to scale your page with the browser dimensions.
 
sjravee,

Thank you for your response. Yes, I did define the cells' width using percentage, and I guess, this is where my misunderstanding is. I thought that using percentages was the best approach. I'll give it a try with fixed widths and heights then.

Thanks a lot.
Have a great day.

 
180602 there's lots of advantages to using percentages, it allows your pages to expand ot reshape to different screen resolutions or how much open a browser window is, for example I rarely have my browser window maximised when surfing the next so your page would need to resize to fit into my browser window.

If you go with fixed widths, which I always use on my own pages, then just bear in mind that your pages need to be viewable in different resolutions. The best way to do this is to keep your table widths below about 700-750px which will leave just a little bit of space around your content on resolutions of 800*600.
Btw I never define HEIGHTS of tables, AFAIK its not recommended for tables or rows but can be for cells(?).


É

endamcg-logo1b.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top