I have an html document (all text, like a newspaper article, etc...). I want to display this page inside a table cell on a different page. This probably isn't hard, but I can't seem to wrap my head around it. Any solutions?

Ideally, when the text is displayed inside the table cell, the text will wrap horizontally (kinda like a word processor does), but will scroll vertically. I want the excess text (larger than the cell size) to remain hidden until scrolled, in other words I don't want to change the size of the cell.

I hope I explained this correctly. I'm still very new to this. Any code snipets would be a huge help.

Thanks again.

3 answers

danwellman 5600
0
points

Have you tried using an iFrame? Set the SRC attribute to the page you want to pull in...

Answered about 9 years ago by danwellman
  • The problem with an iframe, though it may not be a fatal problem, is that iframes do not resize dynamically, though cells often do, unless their width is set explicitly (and sometimes even then). Eugene Zaretskiy almost 10 years ago
Doug 1095
0
points

Put the content inside a div with the following CSS:

width:100px; /* change height and width as desired */
height:100px;
overflow:auto;
Answered about 9 years ago by Doug
Sam S 0
0
points

I'm with danwellman. Try using an iFrame and you can set the width/height of that iframe via css.

<iframe src='url-to-page'></iframe>
<style>
iframe {
    width: 100px;
    height: 500px;
    }
</style>

you can look here for some ideas if you want to just put the article on the same table. http://www.freebits.co.uk/scroll-box-using-css.html

Answered about 9 years ago by Sam S