Center the Container
-
Hello, I’ve been changing some of the layout sizes (sidebar, header, footer etc.) in my custom CSS editor, so far everything has worked out great. But, I ran into one snag, the container is no longer centered with the page, even though the header remains centered.
Below is the code I used to update my page:
@media all and (min-width: 1095px) { /* Overall */ .container { margin: 10px auto; width: 1095px; overflow: hidden; } .header { position: relative; width: 1095px; margin: 0 auto; padding: 30px 0 0; } .section { float: left; width: 640px; margin: 30px 0 30px 20px; } .aside { float: right; width: 375px; margin: 30px 20px 30px 0; background: #f8f8f8; } .footer { clear: both; overflow: hidden; margin: 0 auto; width: 1095px; color: #777; } /* .nav */ .nav { position: relative; width: 1095px; display: inline-block; background: #000; padding: 0 25px; margin-top: 40px; clear: both; line-height: 1em; text-transform: uppercase; } }
I would think that the:
margin: 10px auto;
would center the container element, but it isn’t seeming to do so. Website: mrsfancee.comAny help is greatly appreciated ??
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Center the Container’ is closed to new replies.