Jump to content

Wide tables in a webpage


bdt1

Recommended Posts

I have a short report that I am trying to set up as a web page. It is a few thousand words of text with several wide tables interspersed. I'm looking for a way to incorporate the tables into the rest of the html code in a way that doesn't just resize the entire document to the width of the widest table with one scroll bar at the bottom. Is anyone aware of a way that will let the text default to the reader's browser width, but each (large) table could have its own scroll bar? I think I could do it with frames, but I don't really want to go that route. The only other caveat that I have to live with is that everything must be on a single page - I can't make the tables separate pages with links from the main page.I appreciate any help.

Link to comment
Share on other sites

I have a short report that I am trying to set up as a web page. It is a few thousand words of text with several wide tables interspersed. I'm looking for a way to incorporate the tables into the rest of the html code in a way that doesn't just resize the entire document to the width of the widest table with one scroll bar at the bottom. Is anyone aware of a way that will let the text default to the reader's browser width, but each (large) table could have its own scroll bar? I think I could do it with frames, but I don't really want to go that route. The only other caveat that I have to live with is that everything must be on a single page - I can't make the tables separate pages with links from the main page.I appreciate any help.
Sounds to me like you are having to depend on a fixed width parent table in order for your text to grow. I suppose the "one scroll bar at the bottom" you are mentioning is the horizontal scroll bar.Do you need your text inside a table? Have you tried moving your text out of that table and instead use <p> tags in it's place?
<p>  Your few thousand words go here. When you use the <p> tag, your words will expand with the browser window, so no matter how small (to a certain extent) or how large the text, it will never display a horizontal scroll bar.</p>

More info about the <p> tag here:http://www.w3schools.com/tags/tag_p.asp

Link to comment
Share on other sites

RahX,What I have is a bunch of paragraphs with <p></p> tags. Then between some of the paragraphs, I have some wide tables that exceed the width of the screen. The tables are rows and columns of data, not more text. I want to have a scroll bar for each table (data) and let the paragraphs (text) size with the browser window. This seems to do what I was looking for:

<div style="overflow: scroll; width: 100%">

Now I might need to experiment with freezing the leftmost column and header row to make navigation easier. thanks for your input.

Sounds to me like you are having to depend on a fixed width parent table in order for your text to grow. I suppose the "one scroll bar at the bottom" you are mentioning is the horizontal scroll bar.Do you need your text inside a table? Have you tried moving your text out of that table and instead use <p> tags in it's place?
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...