bdt1 Posted November 6, 2007 Share Posted November 6, 2007 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 More sharing options...
zppblood Posted November 6, 2007 Share Posted November 6, 2007 Use div tags and CSS. Create a div tag and set it's width/height and use the overflow property with the value of auto.http://w3schools.com/css/pr_pos_overflow.asp - This page talks a little about the overflow property and it's values.http://w3schools.com/css/tryit.asp?filename=trycss_overflow - This one allows you to play with the code. Link to comment Share on other sites More sharing options...
bdt1 Posted November 6, 2007 Author Share Posted November 6, 2007 Thanks, that's just what I need. Use div tags and CSS. Create a div tag and set it's width/height and use the overflow property with the value of auto. Link to comment Share on other sites More sharing options...
Err Posted November 6, 2007 Share Posted November 6, 2007 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 More sharing options...
bdt1 Posted November 7, 2007 Author Share Posted November 7, 2007 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.