{"id":334,"date":"2015-06-29T23:22:20","date_gmt":"2015-06-30T06:22:20","guid":{"rendered":"https:\/\/traverstodd.com\/?p=334"},"modified":"2015-07-18T19:35:22","modified_gmt":"2015-07-19T02:35:22","slug":"the-easiest-responsive-web-design-framework-by-traverstodd","status":"publish","type":"post","link":"https:\/\/traverstodd.com\/the-easiest-responsive-web-design-framework-by-traverstodd\/","title":{"rendered":"The easiest Responsive Web Design (RWD) Framework"},"content":{"rendered":"
Don’t want a bloated framework you have to learn\/master just to be able to build a robust site structure that breaks down nicely into RWD (responsive web design)?<\/p>\n
We don’t either.<\/p>\n
For most projects we use a few simple reusable CSS classes to make RWD much easier. Frameworks like HTML5 boilerplate or Zurb’s foundation are great – but if you’re building something custom for a client or yourself, it’s nice if you don’t need a terrible amount of documentation. We don’t use 95% of the bloated JavaScript that comes with most frameworks, because we write our own. Same with CSS.<\/p>\n
So we use some simple classes all the time that have accelerated our RWD development.<\/p>\n
\r\n\r\n\/* reusable classes *\/\r\n.hidden { display: none; }\r\n.invisible {visibility: hidden; }\r\n\r\n\/* micro clearfix below. contains floats like .clearfix. *\/\r\n.cf:before, .cf:after { content: \" \"; display: table; }\r\n.cf:after { clear: both; }\r\n\r\n\/* need to clear floats instead of contain them? use this below. *\/\r\n.clear, .clear-both { clear: both; }\r\n\r\n\/* need to float things? we got you covered. *\/\r\n.left, .floatleft { float: left !important; }\r\n.right, .floatright { float: right !important; }\r\n\r\n\/* these are for images, below. gives a nice margin. sweet. *\/\r\n.alignright { float: right; margin: 0 0 15px 15px;}\r\n.alignleft { float: left; margin: 0 15px 15px 0;}\r\n.floatnone { float: none; }\r\n\r\n\/* need a middle-aligned header. don't write another CSS rule. just use these! *\/\r\n.text-left {text-align: left;}\r\n.text-right {text-align: right;}\r\n.text-center {text-align: center;}\r\n\r\n\/* magic. many combinations exists with simplicity. *\/\r\n.float20 { float: left; width: 20%; }\r\n.float25 { float: left; width: 25%; }\r\n.float33 { float: left; width: 33%; }\r\n.float50 { float: left; width: 50%; }\r\n.float66 { float: left; width: 66%; }\r\n.float75 { float: left; width: 75%; }\r\n.float80 { float: left; width: 80%; }\r\n\r\n<\/code><\/pre>\nBreaking down the CSS<\/h3>\n
So, let’s say you have a container split into one-third\/two-thirds. Use a .float33<\/strong> and a .float66<\/strong>. Bam! Easy.<\/p>\nUsing some code like this:<\/p>\n
<div class=\"cf\"><!-- like, clear your floats! --> \r\n <div class=\"float66\">stuff here<\/div> \r\n <div class=\"float33\">MOAR stuff<\/div> \r\n<\/div> <\/code><\/pre>\nYou’d get this:<\/p>\n
\nstuff here<\/div>\nMOAR stuff<\/div>\n<\/div>\n <\/p>\n
<\/p>\n
Then, when you get to your desired breakpoint, you just assign:<\/p>\n
.float33, .float66 { float: none, width: 100%; } <\/code><\/pre>\nto make them span the full container\/window\/etc. Like so:<\/p>\n
\nstuff here<\/div>\nMOAR stuff<\/div>\n<\/div>\nBut wait. You say you want the sidebar .float33<\/strong> to be on top when it hits the breakpoint?<\/p>\nJust put .float33<\/strong> above .float66<\/strong> in the DOM, and add a class of .right<\/strong>. Dishes are done!<\/p>\n<div class=\"cf\"><!-- like, clear your floats! --> \r\n <div class=\"float33 right\">MOAR stuff<\/div> \r\n <div class=\"float66\">stuff here<\/div> \r\n<\/div> <\/code><\/pre>\nAnd you get:<\/p>\n
\nMOAR stuff<\/div>\nstuff here<\/div>\n<\/div>\nI mean, really…<\/h3>\n
RWD does not need to be overly complicated. Yet frameworks often feel that way. Above may be too simple for every project, but they help us immensely in rapidly developing RWD sites.<\/p>\n
Reuse and recycle!<\/h4>\n","protected":false},"excerpt":{"rendered":"
Don’t want a bloated framework you have to learn\/master just to be able to build a robust site structure that breaks down nicely into RWD (responsive web design)? We don’t either. For most projects we use a few simple reusable CSS classes to make RWD much easier. Frameworks like HTML5 boilerplate or Zurb’s foundation are […]<\/p>\n","protected":false},"author":1,"featured_media":335,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3],"tags":[],"acf":[],"yoast_head":"\n
The easiest Responsive Web Design (RWD) Framework - User Experience Design, Strategy, and App Development | Travers+Todd<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n\n\n\n\t\n\t\n\t\n