{Carrer web log} ←
CSS Mobile Reset
Wednesday, November 17, 2010 { 12 Comments }
I’m not sure if the title of this project should be called CSS Reset or CSS Set or CSS Mobile Base. The goal is to provide default CSS for mobile devices.I started with this objectives:
- It should be small
- It should reset only the necessary HTML elements
- Should set only the necessary HTML elements
- It should provide better typography solution
Few years ago I build Hartija CSS Print Framework, the great thing about Hartija is that you have very fast print ready page. The same thing I want to achieve with the Mobile Reset to have content ready fast solution.
It should be small
Internet connection for mobile phones are still expensive and slow so smaller CSS file will provide faster download and better user experience.
Reset only the necessary HTML elements
All the browser implement CSS reset by default. I don’t think that is always smart to reset the reset. If you building complete CSS Framework is OK to reset everything but in many cases it is better to reset just the main HTML elements or the critical HTML elements.
Set only the necessary HTML elements
After resetting some elements it would be nice to set some HTML elements optimized for mobile phones.
We want to images not to be bigger than the mobile screen or if one word is bigger than the screen the word should brake.
We should provide meaningful base typography solution
Have you tried reading from mobile phone without zooming? I suggest to start with bigger font size. I implement 16px default font size. Feel free to change it. I also picked Arial like default font. Sans-serif can work well in some older low resolution mobiles.
And here is CSS Mobile Reset:
/* CSS Mobile Reset */
html, body
{
margin: 0;
padding: 0;
border: 0;
}
body
{
font-family:Arial, sans-serif;
line-height:1.5;
font-size:16px;
background: #fff;
padding:5px;
color: #000;
word-wrap: break-word;
-webkit-text-size-adjust: none;
}
h1, h2, h3, h4, h5, h6{ font-weight: normal; }
p img { float: left; margin: 0 10px 5px 0; padding: 0; }
img { border: 0; max-width: 100%; }
table { width:auto; border-collapse: collapse;border-spacing: 0; }
Download on GitHub
Demo1
Demo2
You can use CSS Mobile Reset with combination of Bulletproof CSS3 media queries.
Here is a Demo.
Any suggestions how CSS Reset can be improved?
12 Responses to “CSS Mobile Reset”
- // Mikko Ohtamaa // 11/17/2010
- // Vladimir // 11/17/2010
- // Unknown // 11/18/2010
- // nLL // 11/18/2010
-
// Vladimir
// 11/18/2010
@nLL: I read somewhere that the older Opera mobile browsers doesn't support font family and they few default fonts. So the older browsers will ignore the font and use there fonts and that is not a problem. Newer browsers will render the font properly I hope. Unfortunately I have possibility the solution on few mobile phones.
@all: I will appreciate your help if you could test this solution on your mobile phone. - // Beben Koben // 11/19/2010
- // joneorange // 11/26/2010
- // Vladimir // 11/29/2010
- // Web Design Firm NJ // 12/12/2010
- // Hannes // 2/14/2011
- // Brett Widmann // 2/25/2011
- // Unknown // 6/11/2012
<< Home
About Me <<<
Name: Vladimir Carrer
vladocar [at] gmail.com
Location: Verona, Italy
I'm a web designer, developer, teacher, speaker, generally web addicted ...
My projects <<<
- AI Prompt Directory
- Hand Drawn Icons
- Font Design Inspiration
- Font Pairings
- Free SVG Cut File
- Upcoming NFT projects
- Discord Tutorials
- Free Sublimation Designs
- Tech Feed
- MySQL Lite Administrator
- Quark Mini PHP CMS
- Formy - CSS Form Framework
- Emastic - CSS Framework
- Malo - CSS Library
- The Golden Grid
- 1 line CSS Grid Framework
- Two Lines CSS Framework
- Child Selector System - CSS Framework
- Better Web Readability Project
- Azbuka - CSS Typographical Base Rendering Library
- ClipR - bookmarklet for better reading
- CSS3 Action Framework
- CSS Mini Reset
- HTML5 Mini Template
- CSS Mobile Reset
- picoCSS - JavaScript Framework
- HTML Lorem Ipsum Crash Test
- Object Auto Documentation - JavaScript
- o - JS Library for Object Manipulation
- Foxy - CSS Framework
- Tumblr Free Theme - Better Readability Project
- Box - CSS Framework
- SMART CSS GRID
- nanoJS - Minimal JS DOM Library
- Flexy CSS Framework
- Katana is CSS Layout System made with Flexbox
- Micro CSS Reset
- 60 Grid System
- Simple CSS Button
- ramd.js JavaScript library for making web applications.
- Minimal Notes web app build with Vue.js
- Scribble Font for Prototyping & Wireframing
- Flex One - 1 CSS Class System
- Floaty - CSS Float Based Layout System
- Infinity CSS Grid
- CLI Convert websites into readable PDFs
- keywords-extract - CLI tool, extract keywords from any web page.
- screenshoteer - Make website screenshots and mobile emulations from the command line.
- Basic.css - Classless CSS Starter File
§§Previous Posts <<<
- About JSONP in JavaScript
- Two Lines CSS Framework
- About the dollar sign ($) in JavaScript
- Canvas Grid - JS1K entry
- I have great startup idea: It’s Hacker News ReDesign
- Fireworks Mini Web Wireframing Kit
- iPhone Wireframe Kit - Google Docs
- HTML5 Mini Template
- GReadable - readability bookmarklet for Google Re...
- TweetThisPage - bookmarklet for fast twitter posting
Other Profiles <<<
Content is licensed under a Creative Commons Public Domain License