Setting up padding for websites in mobile devices
Posted
by
ambrelasweb
on Stack Overflow
See other posts from Stack Overflow
or by ambrelasweb
Published on 2012-11-05T06:50:26Z
Indexed on
2012/12/13
23:03 UTC
Read the original article
Hit count: 214
I had finished this website a while ago but something happened to it and I've now spent all day fixing it and getting it back from scratch as my backup wasn't correctly done. I don't quite understand what it's doing as I've done this technique on many other websites with no troubles, maybe I've looked at this website too long?
Here is the website. I'm wanting to put some space on the left and right hand side, however I dont just have one container as I was needing the dark grey bar at 100% of the screen and always under the banner no matter where it was. So there are 4 "containing" divs that I want to have the space. I've placed soem CSS3 media queries in but now I'm getting a gap to the right. I was thinking it was because my background mages are going all the way across but they set at 100% so I'm just not understanding whats going on. It's somethign simple, I'm not seeing it right now..
This is what I have for the media queries
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
#header, #banner, #main, #footer-widget-area { padding: 0 2em 0 2em; }
}
This is what t looks like on my iPhone
Any advice is helpful and appreciated.
© Stack Overflow or respective owner