{Carrer web log}
Box - CSS Framework
Thursday, March 01, 2012 { 8 Comments }
Last week I stumbled upon ingrid - CSS Frameworks that is based on display:inline-block; and box-sizing: border-box; principles. I felt like the display:inline-block; and box-sizing: border-box; are right principles for building easy to understand CSS Framework.box-sizing:border-box includes the padding and the border inside the element width. You can learn more here, here and here.
display:inline-block; it similar to float:left but gives some extra powers like vertical-align:top; More here ..
My constraint obsession about CSS Frameworks forced me to build one more CSS Framework based on these principles.
Basically it is all about this code:
{
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
display:inline-block;
margin-right: -4px; /* inline-block hack */
/* You could and you should change these settings */
border-left: 15px solid #eee; /* the border can also be used as gutter */
padding-left:10px; /* padding becomes margin */
vertical-align:top;
}
We have border-box model and inline-block with margin-right: -4px; for the extra spaces between the elements.
The classical CSS Frameworks usually have default gutter(margin) size like 10 or 20px and if you want to change that you need to rewrite all the framework logic. In this case only thing you need to do is change just one number.
I've used some components from my previous framework The Golden Grid and Malo.
The grid contains both pixel and percent grid, meaning endless grid combinations and possibilities and the best thing is (like I mentioned before) you can change instantly the gutter value. The percent grid works little different than px grid, you will probably do best by just using the padding like gutter.
Feel free to change the naming system of this framework and choose the semantic you prefer.
Change the default padding and the border.
The grid is also Responsive optimized for mobile devices.
All the CSS is around 1kb.
This framework does not work in IE6,7. You need additional CSS for that.
The PX Grid
The % Grid
Demo
Download this project on Github
I hope that you will take some time to understand how this system works, box-sizing: border-box can display:inline-block are really powerful layout building techniques that can help you build fast and easy CSS solutions.
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 <<<
- GPT-3 and CSS Frameworks
- Don’t use CSS Reset use CSS Set
- One Page 2020 Calendar Print Version
- 3 CLI tools based on Node.js
- Scribble Font for Prototyping & Wireframing
- ramd.js - Small JavaScript library for making TODO...
- Katana.scss - CSS Layout System made with Flexbox
- Flexy CSS Framework
- nanoJS - JavaScript for DOM manipulation
- SMART CSS GRID
§Archives <<<
- May 2006
- June 2006
- July 2006
- August 2006
- September 2006
- October 2006
- January 2007
- February 2007
- October 2007
- April 2008
- June 2008
- July 2008
- August 2008
- September 2008
- November 2008
- December 2008
- January 2009
- February 2009
- March 2009
- April 2009
- May 2009
- June 2009
- August 2009
- September 2009
- October 2009
- November 2009
- December 2009
- January 2010
- February 2010
- March 2010
- April 2010
- May 2010
- June 2010
- July 2010
- August 2010
- September 2010
- October 2010
- November 2010
- December 2010
- January 2011
- February 2011
- March 2011
- April 2011
- May 2011
- June 2011
- July 2011
- August 2011
- September 2011
- October 2011
- November 2011
- December 2011
- January 2012
- February 2012
- March 2012
- April 2012
- June 2012
- August 2012
- November 2012
- January 2013
- March 2013
- June 2013
- October 2013
- November 2013
- March 2014
- September 2014
- October 2014
- November 2015
- March 2018
- May 2018
- June 2018
- July 2018
- October 2018
- January 2019
- January 2020
- June 2020
- April 2021
Other Profiles <<<
Content is licensed under a Creative Commons Public Domain License