Top White Space Desktop vs Mobile
-
Hello, I’m working on this test site right now with a child theme of Twenty Twelve and just made a few tweaks to make it look just right.
However, since there is a gray space from the background in the original Twenty Twelve theme at the top, I put in -20px for the top margin.
body { font-family: Georgia, Times New Roman, serif; text-rendering: optimizeLegibility; color: #000; margin-top: -20px; }
Then to reduce the white space at the top, above the site title, I put in a -20px top margin for site-header.
.site-header { padding: 0px 0; padding: 1.714285714rem 0; font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; color: #000; font-size: 24px; font-size: 1.714285714rem; margin-top: -20px; }
However, it makes the spacing inconsistent on mobile. It looks fine on an iPhone, but when in landscape view on Android, the site title is almost cropped at the top.
Ideally, I’d like to remove the gray background space at the top entirely and move the whole site up if it didn’t crop the site title when viewing on a phone. If that’s difficult, then I’d be fine with leaving a bit of gray at the top, but I’d really like to reduce the white space so that it doesn’t look so empty on desktop, yet not chopped off on phones. I’m not very experienced in coding for mobile devices and I’m not really a programmer either, but if anyone has any suggestions on how to code it better so that it looks more consistent on mobile, I would greatly appreciate it.
Thanks!
- The topic ‘Top White Space Desktop vs Mobile’ is closed to new replies.