01-29-2023, 11:51 PM
(01-29-2023, 04:46 PM)Tina Wrote: Hello guys,
I have a problem and maybe you could help me out. My webclique "Spirits" has a footer image but due to my lack of html knowledge i am unable to put in the center. What am I doing wrong?
http://midnight-cloud.net/spirits
Hi,
I noticed you had text-align: center; on your #footer container, but since that's not full width, it doesn't do anything.
Try moving the text-align: center; out into the <footer> container, and then add margin: auto; (specifically, make margin-left and margin-right auto) to your #footer container.
Something like this in your css:
Code:
footer {
margin: 0 auto;
text-align: center;
}
#footer {
margin: auto;
bottom: 0;
text-align: center;
width: 1280px;
}Generally, to center block elements like this, you want to make the parent container text-align: center; and the child container (what you want to center) have margin-left: auto; and margin-right: auto;
Hope this helps!
Si vis artem, para bellum

