coure2011
coure2011

Reputation: 42404

css 100% height

I have a structure like this

<body>
    <div class="level1">
        <div class="level2"></div>
    </div>
</body>

I want to apply 3 different images on body, .level1, level2 all required 100% height. How to apply? min-height: 100% works only for body and level1 but not on level2.

How to apply it?

Upvotes: 1

Views: 265

Answers (1)

Vilx-
Vilx-

Reputation: 106904

html, body, div.level1, div.level2
{
    height: 100%;
}

And don't forget the doctype!

Upvotes: 2

Related Questions