I’ve had many years html/css experience and i’ve only recently began digging in the responsive world. I’ve bought a book, read many tutorials but something’s bugging me. I’ve yet to find even one example that doesn’t use margin: 0 auto for the base container of the website (to center the website). They, for example, all use:
width: 90%;
margin: 2% auto;
What i’m trying to do is make a website that doesn’t center the main container, but just aligns it to the left. Then, for some reason, when i use a width of 96% (or even 100%) and a margin of a few percent, it doesn’t stretch to the right end like it normally should, so there’s always a bigger margin on the right hand side of the viewport.
Am i overseeing something very logical?
Cheers!
I’m not sure if this is an answer to your question, either, but maybe you could post a test case?
If it’s a mobile device (iPhone ex.) that’s being the bugger, try adding this snippet:
Also, I advise you to use a width of 100% and then adding a padding of something from 2 to 6% (depending on the width you’re focusing on).
Here is quite a useful link for Responsive Design (and a nice demo): http://webdesignerwall.com/tutorials/responsive-design-with-css3-media-queries