html - Container full width -
first of all, sorry title not explicit
here problem: i've container, inside sidebar 280px, , make home page full width. if write
.container { width: 100%; .sidebar { width: 280px; } .home { width: 100%; } } the home page goes underneath, , position aside sidebar. have no idea how it
here css solution using calc() function minus .sidebar width .home
#container { width: 100%; height: 300px; } #container .sidebar { width: 280px; height: 100%; background: blue; display: inline-block; color:#fff; } #container .home { width: calc(100% - 285px); height: 100%; background: yellow; display: inline-block; } <div id="container"> <div class="sidebar">sidebar</div> <div class="home">home</div> </div>
Comments
Post a Comment