Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spirits
#2
(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
Reply


Messages In This Thread
Spirits - by Tina - 01-29-2023, 04:46 PM
RE: Spirits - by Yuuka - 01-29-2023, 11:51 PM
RE: Spirits - by Tina - 02-01-2023, 02:50 PM
RE: Spirits - by Yuuka - 02-07-2023, 01:28 AM
RE: Spirits - by Tina - 02-17-2023, 10:59 AM
RE: Spirits - by Yuuka - 02-18-2023, 02:21 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)