FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Floating sidebars and fluid content





Insanity
On my site, I have a main section with floating sidebars on the left side. I would like to make the main section fluid, so that it adjusts based on how much text is in it. However, when I do this, and my text is shorter than the sidebars on the left, disastrous things happen:

When the text is long enough...
...and when it isn't.

How would I make it so that if the text isn't long enough, the main content box adjusts to the longer sidebar? The CSS is here.
asim
hi buddy,

this is gr8... thanks i was searching for something like this.... thanks once again....
romaop
The problem is that you have two different types of divisions. One is float and the other is not.
First, in order to make them behave the same way both should be float. One float left and the other float right. But then you must make sure they don't overlap. So adjust the width of the two divisions to 20% and perhaps 77% and make small the paddings and margins. 100% is equivalent to 800 pixels here because you set that value in the division that holds the two columns.
There's still a problem with this division.
It should also be treated as float in order to become adjustable.
You may make it as float left or right.
Then do some adjustments to the paddings and margins and, guess what, you made it.

Hope this helps.
GB
Another possibility would be to simply set a min-height for #maingallery. I found 400px to be adequate as your sidebar is a constant height (I assume). So you would then have:
Code:
#maingallery {
background-color: black;
border: 1px solid #202020;
width: 800px;
min-height: 400px; 
}


I hope that helps!
romaop
GB gave a simpler idea that can solve your problem. But if you want a more flexible solution then follow my suggestion. If you've got any doubts, just ask.
By the way, I except a reply from you, Insanity. What do you think about the suggestions? Are you using them? Say something if you're there. A thanks message is also welcome.
Related topics
Mambo Content Problem
How To : Secure Your PHP Website
Google Adsense - *OFFICIAL THREAD*
Donutey, Version 3
ASP content management system
14 ways to add content to your web site and attract visitors
Floating Images?
for your comments
Content Management System Wanted
free content
Learning and Reading Tarot Cards
Brink
Please Hijack this topic!
What happened to the Frihost logo?
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> Design Tips

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.