Jump to content

Site not centreing


jegranet
 Share

Recommended Posts

Specific edge margin-top:, margin-bottom:, margin-left:, margin-right: ONLY have 1 value set to them at a time, for shorthand you can use 1 to 4 values margin: 0 auto; (top/bottom left/right) margin: 10px 15px 5px;(top left/right bottom) margin: 5px 10px 15px 20px; (top right bottom left) So use

margin-top:0; margin-bottom:0;margin-left:auto;margin-right:auto;

OR

margin: 0 auto;

  • Like 1
Link to comment
Share on other sites

Thank you both. I used margin-top:0;margin-bottom:0;margin-left:auto;margin-right:auto; and that worked. Still don't understand why the first one didn't work. (margin: 0 auto;). Now my footer is not working. It is showing 100% instead of site width. Don't you just hate it when stupid little things keep you busy a whole day.

Link to comment
Share on other sites

if you want the footer to be the same width just center it and give it a width of the wrapper or w.e is your main container and that should make it, also i notice that you r.footer doesnt have a width set to it at all, so that would cost it to be displaying 100%.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...