2011 Theme — css fix for mobile device?
-
When I look at my website on an iPhone, a few things are not displaying well. I’m wondering how I can adjust CSS to fix these issues. (I’m using the Twenty Eleven theme.) Right now I have this code in the CSS of my Child Theme, found on this site:
/* =Responsive Structure for narrow screens * to keep min width and sidebar -------------------------------------------- */ @media (max-width: 800px) { #page { min-width: 500px; } /* keep the sidebar - for right sidebar */ .right-sidebar #main #content { margin: 0 29% 0 1%; width: 70%; } .right-sidebar #main #secondary { float: right; margin: 0 1% 0 1%; width: 24%; } /* keep the sidebar - for left sidebar */ .left-sidebar #main #content { margin: 0 1% 0 29%; width: 70%; } .left-sidebar #main #secondary { float: right; margin: 0 -1% 0 2%; width: 24%; } /* correction for 'showcase' template */ .page-template-showcase-php #main #primary.showcase { float: right; margin: 0 2% 0 2%; width: 96%; } .page-template-showcase-php #main #primary.showcase #content { margin: 0 6% 0 6%; width: 88%; } .page-template-showcase-php section.recent-posts { float: right; margin-right: 0pt; margin-left: 31%; width: 69%; } .page-template-showcase-php #main .widget-area { float: left; margin-right: -22.15%; margin-left: 0pt; width: 22.15%; } /* correction for singular posts/pages without sidebar */ .singular #main #content { margin: 0 8% 0 8%; width: 84%; } /* keep floating footer widgets side-by-side at this size */ #colophon #supplementary .widget-area { float: left; margin-right: 1%; width: 32%; } } /*to keep image alignment in narrow browsers*/ @media (max-width: 650px) { .alignleft { float: left; } .alignright { float: right; } }
Here is what I’d like to fix:
1) On an iPhone, the width of my site is reduced — but there is blank space on the right. I’d like to expand the width so it takes over this blank space. (There is a lot of empty space on the right hand side of the homepage, but it’s not as bad on the single post pages — in both cases, I’d still like the content to take over as much of that empty space as possible.)
2) This is perhaps related to the first issue: In the right sidebar, the image and subscribe bar extend out awkwardly when viewed on a mobile device. Is there a way to get them to shrink appropriately on a mobile device? Would that fix my margin issues and the blank space on the right?
3) On the homepage, the Featured Content Slider works fine, but it overlaps the top of the right sidebar. Is there a way to either make the Featured Content Slider shrink appropriately so it’s in-line with the primary content, OR to push the right hand column so it’s below the Featured Content Slider when viewed on a mobile device?
4) Lastly, the search bar covers up some of my header. It’s not terrible, but if there’s a way to move the search bar down in line with the menu (like it is when you view my site on a laptop / non-mobile device).
Any help would be greatly appreciated!
- The topic ‘2011 Theme — css fix for mobile device?’ is closed to new replies.