GithubHelp home page GithubHelp logo

cssbuildingblocks's Introduction

CSS Building Blocks

For a more complete view, visit http://www.info-arete.com/post/2013/02/26/Using-CSSBuildingBlocks-in-your-web-pages.aspx.

CSS Building Blocks is a set of css stylesheets whose primary purpose is to provide vertical and horizontal "spacing helpers". They have no dependencies on existing frameworks such as the 960 grid system or twitter bootstrap, but they can become especially helpful when used in conjunction with one of these frameworks.

One simple scenario for using a "spacer" is to provide a specific and custom amount of height between two elements.

<p>Here's my first paragraph.</p>
<div class="spacer50"></div>
<p>A 50px high spacer exists between my first and second paragraphs</p>.

Another example of their usage is to provide an element inside a grid framework such as twitter bootstrap that prevents a span from collapsing. (Note the use of the spacer classes).

<div class="row">
   <div class="span4">
       <!-- empty has no content per se, but using spacer to prevent collapse -->
       <div class="spacer10"></div>
   </div>
   <div class="span4">
      <p>Some text...</p>
   </div>
   <div class="span4">
       <p>Some text...</p>
    </div>
</div>

<!-- Need a big space between the previous row and the next one, so use one of the bigger spacers -->

<div class="spacer30"></div>

<div class="row">
   <div class="span4">
       <!-- empty, but using spacer to prevent collapse -->
       <div class="spacer10"></div>
   </div>
   <div class="span4">
      <p>Some text...</p>
   </div>
   <div class="span4">
       <p>Some text...</p>
    </div>
</div>

cssbuildingblocks's People

Contributors

mg1075 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.