Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

mobile site layout trouble

mobile site layout trouble


I'm fiddling with a Mobile specific stylesheet where, using a media query, I am using a sheet called "styles_mobile.css" to add style specific to mobile visitors.

I wish there was a way to use only the mobile stylesheet in case of a mobile visitor as opposed to in addition to the original stylesheet - an independent stylesheet.

Anyway, since I cannot find a way without code (I cannot code, only light client side skills) I am having to fiddle with a mobile layout.

It appears that no what property value I try to correct for in the mobile stylesheet I cannot style so that the content fits the screen Width only. Somewhere there is a rule that is making my mobile html appear longer than 100% of screen width and this could be a number of things taken from the original stylesheet.

The URL is here if anyone happens to be able to view with a mobile device, which should be using the "styles_mobile.css" sheet. I have added a solid outline to all elements so the issue is visible:

At the top of the page there is clearly an element stretching out the screen from width, or min-width, property values from the main stylesheet. No matter how much I try to correct these I cannot :-(

Any ideas?

Problem courtesy of: Doug Fir


See if you can set a minimum width for each of the stylesheets to prevent it interfering with any width below what you want it to work for. Should look similar to this:

Solution courtesy of: tomarrell


View additional discussion.

This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

mobile site layout trouble


Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription