View Full Version : Width: 100% - 185px

10-25-2004, 10:49 AM
Hi there,

again I'm in need of help with some CSS positioning. Below you'll find a snippet of my css and the according html. What I'm trying to achieve is that the menu-div and the content-div end up right next to each other and the content-div fils all the remaining space. So actually the content-div should be 100% - 185px wide. How to do such a thing?


#main {
width: 100%;
background: url(./graphics/main2.jpg) no-repeat right bottom;

#menu {
height: 300px;
width: 185px;
padding-top: 1px;
padding-left: 20px;
float: left;
background: url(./graphics/menu.jpg) no-repeat;

#content {
float: left;
height: 375px;
background: url(./graphics/main_background.jpg) no-repeat;


<div id="main">
<div id="menu">
<div id="content">

Thanx for your help! Michiel

10-25-2004, 11:21 AM
Since your menu is in front of the content in the source already, I'd sugggest to not float the content at all, but leave it at auto width (corrections for IE may apply) and give it a proper margin to make room for the menu.