Skip to content Skip to sidebar Skip to footer

Css: 3 Column Height 100%

Here is an example page: http://jsfiddle.net/SkeLLLa/pwfH2/ I want to set 100% height for the content class (see the 'Problem here' comment in the CSS source), but when I do this l

Solution 1:

Use display: inline-block for the columns and height:100% for the html and body tags:

<!doctype html><html><head><style>html, body, #content, #left, #right, #center { height: 100%; }
      #content { width: 100%; }
      #left, #center, #right { display:inline-block; }
      #left, #center, #right { width: 32%; border: 1px solid red; }
 
      /* media query for IE 6-7 */@media, 
        { 
        #left, #center, #right { display:inline; }
        }
      </style></head><body><divid="content"><divid="left">foo</div><divid="center">bar</div><divid="right">baz</div></div></body></html>

Post a Comment for "Css: 3 Column Height 100%"