Reputation: 1
I have the following which is responsible to display the footer and the end of the page:-
<footer>
<p> © @DateTime.Now.Year - My Group </p>
</footer>
Currently the footer is being displayed to the left side of the page, but i want to force it to be located at the center of the page. can anyone advise me on how to do this?
Upvotes: 1
Views: 75
Reputation: 73
If you Want to center the text in the footer you have to do that:
footer p{
text-align:center;
}
If you want to center the footer container, you have to define a with for that, and then use the margins to center it.
footer{
width:900px;
margin-left:auto;
margin-right:auto;
}
Upvotes: 2