crazygol4 Posted October 7, 2008 Share Posted October 7, 2008 Okay so I've tried to do some research on the topic and I find things that are close but not exact. Here's the issue: I have two divs that I want to be side-by-side...but I want the right div "sidebar" to have a static width (200px) and the left "maintextarea" to resize with the browser width (scaled on %). I've even changed the sidebar to resize slightly based on %, but to no avail. My attempts so far have produced either a page that floats properly, but maintextarea resorts to its min-width at all time, or I can get it to resize by removing float from maintextarea, but then sidebar isn't side-by-side with it. So, Is this even possible to have a resizeable float? If so, I could definately use Tips/Suggestion/Code plz Here is my CSS for the divs: #maintextarea { float: left; min-width: 660px; max-width: 960px; margin-right: 0px; margin-left: 0px; padding-left: 6px; padding-top: 6px; padding-right: 6px; padding-bottom: 6px; background-color:#666666; } #sidebar { float: right; margin-top: 0px; margin-right: 0px; margin-left: 0px; min-width: 200px; max-width: 29%; background-color: #0033FF; padding-top: 10px; padding-left: 6px; } Thx for your help! -crazygol4 Quote Link to comment https://forums.phpfreaks.com/topic/127421-resizeable-floats/ Share on other sites More sharing options...
dbrimlow Posted October 7, 2008 Share Posted October 7, 2008 You REALLY need to learn the quick basics of floats. Anyone can show you the solution to exactly what you are looking for, but it will only help you for THAT one circumstance. Without understanding the basic concepts, you will soon get confused and frustrated when you add another element to your wireframe. Here is an easy to follow online tutorial (all html) Floatutorial Quote Link to comment https://forums.phpfreaks.com/topic/127421-resizeable-floats/#findComment-659400 Share on other sites More sharing options...
crazygol4 Posted October 7, 2008 Author Share Posted October 7, 2008 Hey guy I appreciate the link, but I do have a fair understanding of floats. I've never set a static right and expanding left float before. The reason I posted on a forum is because I've spent time using what I currently have in front of me trying to achieve a result to no avail. I'm trying to get this thing going because I really can't afford the hours of digging through floatology 101. This could easily be a mistake in coding, and while I appreciate the fact that you want me to fully understand floats, I simply lack the time at this moment as I'm trying to get this site up quickly. If you would like to offer some help, awesome! If not that's cool too. Thanks for your time to post. -Crazygol4 Quote Link to comment https://forums.phpfreaks.com/topic/127421-resizeable-floats/#findComment-659424 Share on other sites More sharing options...
dropfaith Posted October 7, 2008 Share Posted October 7, 2008 you dont have wdith set min and max are set but there no width; max:29% is fine and all but your telling it that it needs to find a perfect meduim on its own which doesnt seem like a good idea width: should be set Quote Link to comment https://forums.phpfreaks.com/topic/127421-resizeable-floats/#findComment-659430 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.