CoderInNetwork
CoderInNetwork

Reputation: 3093

Using auto in CSS calc

I searched a lot but I didn't find a good resource.

I want to calculate a div height as its contents plus a fix size. I tested calc(auto+50px) but unfortunately It doesn't work (the browser does not interpret it as valid code).

Upvotes: 22

Views: 31673

Answers (1)

rink.attendant.6
rink.attendant.6

Reputation: 46307

Does this produce the desired result?

div {
    height: auto;
    padding-bottom: 50px;
}

Upvotes: 21

Related Questions