#How to make the footer stick to the bottom of its container?

14 messages · Page 1 of 1 (latest)

glacial haven
#

I don't know how to align the footer in the first solo to the bottom of its container, so far I have tried align-self: flex-end; (its parent is has a flex display) I tried margin-top: auto; as well, and I don't really want to have a fixed margin.

winter bridge
#

Try margin-bottom:0 on that footer

#

Or check your body padding

glacial haven
#

The card element is a child of the body

#

I just tried giving the container a margin-bottom: 0 and didn't work, same with the footer

glacial haven
winter bridge
#

Body {
Height:100%
}
?

glacial haven
#

I don't think is anything to do with the body, though, since the footer is inside a container

#

These are the properties of that container:

.card-container {
    text-align: center;
    margin-top: 30px;
    width: 317px;
    height: 780px;
    background-color: #1A1B21;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}
winter bridge
#

Ah then remove that height. I’m guessing your content is not high enough for that container.

glacial haven
#

Thank you so much!

glacial haven
#

@winter bridge A question, should I close the discussion after getting the response I wanted? Or leave it open?