Tool to automatically create mobile CSS?

Paper_Chase

brb gym
Apr 23, 2009
1,499
21
0
Vancouver, Canada
Just finished a new site of mine. I tried viewing it on an iPhone and the text looks messed up. Realized I need to specify font size in em instead of px. Any automated tools out there that can create a mobile CSS file for me?

Thanks!!!!
 


if you did everything in html/css and you literally just want to make things a tad bigger/smaller - then most of this can be done with find/replace. then just make a second version of the site (via subdomain or subdirectory, you choose) and add the appropriate lines to the .htaccess file.

i just googled "html css mobile conversion" and found a few specific methods that only requires a few steps.

loving this mobile plugin lately btw
 
In all honesty, the simplest thing for you to do when building a site (after a CSS Reset at the top of your main CSS file) is to set the body element's font size. This will then be 1em size for the entire document, since it's the containing element for all others. Then, use a px to em conversion tool to figure out a find and replace for the others in your document.

If you do the above, then creating an HTML head element conditional statement to show a specific css file to any screen resolution below a certain size will be much simpler. In that specific css file, you can turn visibility to hidden or style parts of your layout the way you want. I find that floating side navigations to the top or hide that altogether if not necessary is effective.