0

Hay guys, I'm using this hack to get a cross browser 100% height DIV

/* commented backslash hack \*/ 
html, body{height:100%;} 
/* end hack */
html,body {margin:0;padding:0}

#outer{min-height:100%;height:auto;background:#ffffcc}
* html #outer{height:100%;}/* ie6 and under*/

EDIT: However on my div i have a 1px top border and a 10px top margin. This addition totals 16px.

any idea how to edit this css to account for the 16px?

dotty
  • 40,405
  • 66
  • 150
  • 195
  • DUPE and Solution: http://stackoverflow.com/questions/485827/css-100-height-with-padding-margin – dotty Nov 20 '09 at 12:21

1 Answers1

0

Nest it in a new div, that div will automaticly take over the width from its parent.

Ben Fransen
  • 10,884
  • 18
  • 76
  • 129
  • also, but you will have to give the parentdiv an extra setting `overflow:auto`, then you give the nested div a class where `padding:15px;` is set – Ben Fransen Nov 20 '09 at 12:16