jegranet Posted July 18, 2012 Share Posted July 18, 2012 My site is not centreing, despite using, #site { width: 950px; background:#848484; margin:0 auto; }; see: www.templatetest.co.uk Can anyone see what the problem might be. I have never had this problem before and wonder if it is a conflict with something else in the css file.Jean chilli.css Link to comment Share on other sites More sharing options...
jegranet Posted July 18, 2012 Author Share Posted July 18, 2012 (edited) Moved this site to www.chilli-gift-shop.co.uk Nobody got any ideas yet. I have tried changing css to: #wrapper { width:950px;background:#848484;margin-left: 0 auto;margin-right: 0 auto;}but still no joy. Edited July 18, 2012 by Jean Link to comment Share on other sites More sharing options...
eTianbun Posted July 18, 2012 Share Posted July 18, 2012 The 1st code you posted, should work! Link to comment Share on other sites More sharing options...
dsonesuk Posted July 18, 2012 Share Posted July 18, 2012 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; 1 Link to comment Share on other sites More sharing options...
jegranet Posted July 18, 2012 Author Share Posted July 18, 2012 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 More sharing options...
divinedesigns1 Posted July 19, 2012 Share Posted July 19, 2012 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 More sharing options...
jegranet Posted July 19, 2012 Author Share Posted July 19, 2012 Thank you for responding. I have now solved the problem. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now