Jump to content

Site not centreing

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;


margin: 0 auto;

  • Like 1
Link to post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...