I am trying to make a responsive layout. My navigation is fixed on the left with a width of 175px and margin left and right of 10px. I want the site content to be to the right and take up the rest of the screen. I cannot figure out a way to do this with just css (and no JS). Technically i want the width to be 100%-195px. Heres my code:

<body>
    <div id="nav">
    </div>
    <div id="content_holder">
    </div>
</body>
#nav {
background-color:#333;
background-image:url(images/background/yellow_noise.gif);
border:solid #000 1px;
border-top:0px;
border-bottom:0px;
position:fixed;
float:left;
width:175px;
margin:0 10px;
height:500px;
}
#content_holder {
background-color:#333;
float:left;
height:600px;
margin-left:197px;
margin-right:10px;
min-width:500px;
max-width:920px;
width:100%;

}

1 answer

0
points

I tried all the solutions that I could think of and I dont think its possible with CSS (2 at least). Im just going to set the responsive width with javascript.

Answered almost 6 years ago by Stephen Cronin