html - Need help on navigation sidebar and content CSS -


ok on webpage, have left navigation, position if fixed , when want add content on index page, content appears behind navigation , not start after it.

if remove fixed position goes underneath.

navigation css

#nav {     height: 100%;     width: 18%;     background-color: #1c1c1c;     position: fixed;  } 

i tried putting content inside div no luck.

content div

#padding { height: auto; position: absolute; right: 0; 

screenshots

enter image description here

just put content inside div:

<div id="container">     <div id="nav">          <!-- navbar markup -->     </div>     <div id="content">          <!-- content -->     </div> </div> 

with css can style elements:

#container {     width: 100%; } #nav {     height: 100%;     width: 18%;     background-color: #1c1c1c;     float: left; } #content {     width: 82%;     float: left; } 

with float: left 2 divs appears aside.

note:

if don't want put content inside div element, float navbar element:

#nav {     height: 100%;     width: 18%;     background-color: #1c1c1c;     float: left; } 

...that's , following content appears (if possible) on right side of navbar.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -