I want to center my web page footer and create a reasonable gab between it and the above content. Currently, the footer has a line and paragraph joined to the above content. I can push down the content but the line does not move. I am sure the property I am missing out in my css style sheet. Could someone help?
This is my html mark up:
<div id="footer">
<p>Copyright (c) 2010 mysite.com All rights reserved</p>
</div>
Which css property can I use to solve this problem? A sample would be appreciated. Thanks.
If you set the width of your footer element to 50% (25% left margin + 50% width leaves an effective 25% right margin, thus centering the footer itself first) and set the text-align of the footer element to center, it will center the footer divs how you want.
text-align: center <ul class="footerLogos" style="text-align: center; width: 100%;"> <li><img src="logo url"></li> <li... A couple ways you could do this. text-align: center <ul class="footerLogos" style="text-align: center; width: 100%;"> <li><img src="logo url"></li> <li...
Go to Insert > Page Numbers. Select a position (left, center, or right, and header or footer).
You can do this by setting the display property to "flex." Then define the align-items and justify-content property to “center.” This will tell the browser to center the flex item (the div within the div) vertically and horizontally.
#footer{
display: table;
text-align: center;
margin-left: auto;
margin-right: auto;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With