html - CSS3 - Div width=100% pushes content to new line instead of using remaining space -
i have looked around solution problem, haven't found works. bit noobish apologize bit rusty in css.
all have 2 div elements aligned side side horizontally take 100% of window's height , width. div on left have fixed width value , div on right take remaining space.
the solution simple , sure missing basic concept css causing issue if me out , maybe point me literature me understand doing wrong appreciate it.
the html code:
<div id="leftsidebar">left sidebar</div> <div id="content">content</div>
the css:
html, body{ height: 100%; width: 100%; } #leftsidebar{ width:175px; height:100%; background-color:#567880; } #content{ width:100%; height:100%; background-color:#00a0a0; }
you can floats instead:
#leftsidebar{ width:175px; height:100%; float: left; background-color:#567880; } #content{ height:100%; background-color:#00a0a0; }
Comments
Post a Comment