html - How can I make a div 100% of the browser window height, but with a top and bottom margin? -


More specifically, I have a right sidebar that is spread on the right side of the browser window. That part has not presented any problems, however, I want to include devices that are 100% of the height of the browser, but with the margins above and below The contents inside this device will be scrolled if the content will not fit within the browser window height. I can not get it to work, here is my code:

HTML:

  & lt; Div class = "outerwrap" & gt; & Lt; Div class = "infra" & gt; // accessories & lt; / Div & gt; & Lt; / Div & gt;   

CSS:

  .outerwrap {// This status quo: fixed; Correct: 0; Top: 0; Height: 100%; Width: 277px; } .internet {// This width does not work: 277px; Margin: 152 px 0 px 10 px px; Overflow-y: scroll up; Overflow-X: Hidden; Height: 100%; }   

How can I work so that there is an up and down margin on my internal device?

use -

body -

  Html, body {height: 100%;} Outerwrap {height: 100%; Width: 277px; Border: 1 px solid # f 00; } .Intervash {margin: 152 px 0 px 10 px px; Overflow-y: scroll up; Width: 277px; Display area; Status: Completed; Height: auto; Top: 0; Left: 0; Bottom: 0; Background color: green; }    

Comments