PDA

View Full Version : What would be the proper way to create a template for multiple height pages?


fs_tigre
09-10-2009, 12:58 PM
Hi,

What would be the proper way to create a template for multiple height pages? In other words I know I will have pages with multiple heights but some of them will be exactly the same so, I was thinking to make a template but how about those with different heights? Can I have a CSS file for each of those pages that will be different?

What would be the best practice to do this?

Thanks a lot

Corrosive
09-10-2009, 01:27 PM
Just don't specify heights for your div tags. They will grow automagically with your content.

fs_tigre
09-10-2009, 02:17 PM
Mmm, I will try this. Thanks

fs_tigre
09-10-2009, 02:32 PM
Just don't specify heights for your div tags. They will grow automagically with your content.But how about when you have multiple <divs> growing vertically, menu on one, content on the other one etc… with different different content amount?

Corrosive
09-10-2009, 06:45 PM
I don't understand the question. All three will still grow with the content.

fs_tigre
09-10-2009, 08:14 PM
I don't understand the question. All three will still grow with the content.

They will grow depending on how much content they have, no? and what I'm saying is that since my layout has three vertical divs I would need to balance the content in order to grow all three of them, because if I add content only to one the other two wont grow.

Am I wrong? Unfortunately I can't try this at the moment but I will as soon as I get home.

Thanks

Corrosive
09-10-2009, 08:24 PM
I think what you are getting at is that you don't want three uneven length columns. Is that right?

You could use the min-height attribute in CSS but this is not supported by some older browsers.

Alternatively you can make a wrapping div and give that the same background colour as the columns. This gives the appearance that they stretch all the way down.

fs_tigre
09-10-2009, 08:56 PM
There you go! your awesome, sorry for the confusion. I will try the background thing.

You could use the min-height attribute in CSS

Can you explain how this works?

domedia
09-11-2009, 03:05 AM
You could use the min-height attribute in CSS but this is not supported by some older browsers.
Uhm.. Is this a nice way of saying it will not work for the majority of users ;-)

Alternatively you can make a wrapping div and give that the same background colour as the columns. This gives the appearance that they stretch all the way down. This is a great way of achieving it. It is my preferred method.

Corrosive
09-11-2009, 07:11 AM
Uhm.. Is this a nice way of saying it will not work for the majority of users

yes, afraid so. :(