• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

HTML table/iframe

Vegitto

Diamond Member
So, I'm designing another site today.. And I still code like a retarded monkey, so I use tables, the only thing I can kind of use.. One problem: I need my table (or the iframe within my table) to stretch, so that 100% of the content fits in and no scrolling is required. I added the code I'm using now..

Thanks in advance 🙂.

EDIT: Someone posted a solution, but this only works in IE (6 and 7), not in FF.. I edited the code 🙂.

EDIT: Basically, what I would want is to be able to 'call' my content using php include('bla.php'), and that the frame or table resizes itself so that no scrolling has to take place. IE, if I call a page with an image that is 800x900 and a few paragraphs of text underneath, I want the frame or table to display ALL of the content.
 
Originally posted by: Vegitto
Because if I add text in a table it gets centered automatically? Or is there a way around that?

Does it? Weird...

What exactly are you trying to do? Does the text to be included have to be in a separate file?
 
Originally posted by: Atheus
Originally posted by: Vegitto
Because if I add text in a table it gets centered automatically? Or is there a way around that?

Does it? Weird...

What exactly are you trying to do? Does the text to be included have to be in a separate file?

Well, what I'd love the most is to be able to use php include(bla.php).. But if I just type in a table, it gets centered. I'll make a screenshot 🙂.
 
Well, I found why it doesn't work.. FireFox doesn't recognize the on[/i]Load attribute.. 🙁
If anyone can help me, please do. 🙁

EDIT: What's so wrong about on[/i]Load?
 
Firefox does recognize 'on load', I've used it before, not sure why it's not working for you. Why not just use a div? Divs expand to fit the content you put inside them unless you give them a specific size.

----------------------------------------------------

<html>
<head>
<style>
div.example_div {
width: 552px;
margin: 10px;
border: 1px solid black;
}
</style>
</head>
<body>
<div class="example_div">
example
</div>
<div class="example_div">
this is a<br/>
slightly longer<br/>
example paragraph<br/>
...
</div>
</body>
</html>

----------------------------------------------------

See I only specified the width here? The height is the height of the content.

Remember you can put your php include instead of typed content.
 
What I've got now:

EDIT: Oh, and how could I make one div take over the height of the other one (essentially making "text" and "foto" the same height, that of the longer one)?
 
Originally posted by: Vegitto
And how would one apply this on a table?

Divs and css remove the need for tables. Unless you're using it as an actual table of figures or something, rather than formatting...

What I've got now:

Does that look how you want it to look? Where are you trying to get to?
 
Originally posted by: Atheus
Originally posted by: Vegitto
And how would one apply this on a table?

Divs and css remove the need for tables. Unless you're using it as an actual table of figures or something, rather than formatting...

What I've got now:

Does that look how you want it to look? Where are you trying to get to?

Okay, I've got them next to each other, I made a 'container' for both.. What I want now is that, if, for example, "text" contains 800px in height, but "foto" only contains 200px, "foto" gets stretched to 800px. 🙂
 
Originally posted by: Atheus
Try having them both 'height: 100%;'. This will (should) be 100% of the container, not the page.

The container doesn't have a height attribute, either... 😕
 
Back
Top