SecretWalrus
SecretWalrus

Reputation: 99

Center align text to the bottom of a div

Basically I got the text on the bottom of the div where I like, but the problem is it's aligning left and I would like for it to be in the center of my div.

CSS3

#article-footer {
    width: 100%;
    margin: 0 auto;
}

#article-footer {
    position: relative;
    width: 70%;
    float: left;
    font-weight: bold;
    font-size: 23px;
    color: #354175;
}

#article-footer span{
    position:absolute;
    bottom: 0;
}

Upvotes: 2

Views: 12457

Answers (2)

sush
sush

Reputation: 379

Use this

text-align: center !important ;

Upvotes: 1

n1kkou
n1kkou

Reputation: 3142

#article-footer span{
position:absolute;
bottom: 0; 
left:50%;
margin-left:-50%;}

Upvotes: 6

Related Questions