Log in

View Full Version : Using templates with pages that has different size contents



keastie
12-07-2009, 04:34 PM
Hi Guys,

I have created a template which is working really well, the only problem is some of my pages have a lot more content than others, meaning that the content is overflowing the Div that its going into. Any ideas on how I can get it so that the Div stretches with the content on each individual page?

George

djr33
12-07-2009, 10:30 PM
Don't make your templates too specific. If you have exactly the same size content each time, you can do that (like if you have a 100x200 image every time). But if you have varying content, your layout needs to scale properly. The easiest way to do this is to have a percentage based layout that can scale as needed. The other way is to make the height variable but the width set. This means you will have something like a newspaper article website. Each page has a set width and set things at the top, but then content in the main div can extend infinitely down until it is done. A lot of templates work like that.
If you need specific help with a specific page, you need to show us an example (link, or if you can't link us, post the code).