NavyPixel
NavyPixel

Reputation: 260

Table not sitting at 100% height within DIV tags

I have setup a table within a DIV tag at the following link:

http://jsfiddle.net/yVDXQ/122/

html {
height: 100%;
}

.container {
background: yellow;
min-height: 100%;
width: 50%;
margin: 0 auto;
}

i was wondering if i can get my table to inherit the 100% height from the DIV it sits within?

Would be greatful for some assistance.

Upvotes: 0

Views: 62

Answers (2)

designtocode
designtocode

Reputation: 2245

Just apply a height: 100% to the container div, check out your updated jsfiddle http://jsfiddle.net/msbodetti/yVDXQ/125/

Div CSS:

.container {
    background: yellow;
    min-height: 100%;
    height: 100%;
    width: 50%;
    margin: 0 auto;
}

Upvotes: 0

Nick R
Nick R

Reputation: 7784

Add height:100% to .container and it will stretch it.

JSFiddle Demo

Upvotes: 2

Related Questions