I've got a page which has a body min and max width. within the body are two inline div classes, the right div is fixed width. the left div i want to adjust its size automatically to fill the remaining body width depending on the body's width
<body>
<div class="wrapper">
<!-- HEADER -->
<!-- MAIN -->
<div class="main content">
<div class="form wide">
right div
</div>
<div class="left superwide">
left div
</div>
</div>
</div>
</div>
</body>
.content {
min-width: 780px;
padding: 0 44px;
}
.main {
margin: 0 auto;
max-width: 1000px;
padding-bottom: 100px;
padding-top: 35px;
width: auto;
}
.wide { width: 310px }
.superwide { width: 50% }
.form { float: right }
.left { float: left }
so i want my left div to be 700px width when the main div reaches its max width, and to go down to 500px when content div reaches its min width (so it always stays at 100% of the width minus the right div.
.superwide is currently set to 50%, which works when content is at its min width. but when at the max width im getting a bigger gap between left and right divs.
I'm struggling to do this with without using javascript. hope i've explained this well enough. any ideas?
This post has been edited by farril: 11 September 2012 - 02:44 PM

New Topic/Question
Reply



MultiQuote







|