CSS Framework Blueprint

Source: Internet
Author: User

Accustomed to the background of our program, whether it is interested in the front-end programming, through the CSS framework, so that we can easily develop a page based on the DIV+CSS layout, today let us understand the next famous Blueprint CSS Framework bar!

Its official website: http://www.blueprintcss.org/

First you should declare a good CSS, which is very simple, by adding the following references in the head area of the page:

HTML code
  1. <link rel="stylesheet" href="css/blueprint/screen.css" type= "Text/css" media= "screen, projection">
  2. <link rel="stylesheet" href="css/blueprint/print.css" type= "Text/css" media= "Print">
  3. <!--[if LT IE 8]><link rel= "stylesheet" href= "Css/blueprint/ie.css" type= "text/css" media= "screen, projection "><! [endif]-->

Blueprint provides us with a variety of CSS files such as grid,form,print,reset,typography, and we focus on the next layout.

By default, 950px is the width, for example we can use the following code to represent the center div of the 950px:

HTML code
    1. <div class="container">
    2. Lt;p>here ' s my site! </P>
    3. </div>

You can use Span-x to define the column in the container, for example, we need to implement the common top, main area 3 column layout, which can take advantage of the following code:

HTML code
  1. <div class="container" style= "border:1px solid #000;" >
  2. <div class="span-24 last">
  3. Top of
  4. </div>
  5. <div class="span-4">
  6. Left sidebar
  7. </div>
  8. <div class="span-16">
  9. Subject
  10. </div>
  11. <div class="span-4 last">
  12. Right Sidebar
  13. </div>
  14. </div>

The Span-x naming convention is to specify the width, each span-x is 40px higher than the previous one and the starting value is 30px, which can be found in the Grid.css file as follows:

HTML code
    1. /* Use these classes to set the width of a column. */
    2. . span-1 {width:30px;}
    3. . span-2 {width:70px;}
    4. . span-3 {width:110px;}
    5. ......
    6. . span-23 {width:910px;}
    7. . span-24, div.span-24 {width:950px; margin-right:0;}

The definition of the column in the container is perhaps nested, such as the following code we have fixed a top, middle, top layout, in which part of the left, middle and right layout, the middle side includes the upper and lower layout, the code is as follows:

HTML code
  1. <div class="container">
  2. <div class="span-24 last">
  3. Header
  4. </div>
  5. <div class="span-4">
  6. Left sidebar
  7. </div>
  8. <div class="span-16">
  9. <div class="span-8">
  10. Box1
  11. </div>
  12. <div class="span-4">
  13. Box2
  14. </div>
  15. <div class="span-4 last">
  16. Box3
  17. </div>
  18. <div class="span-16 last">
  19. Main Content
  20. </div>
  21. </div>
  22. <div class="span-4 last">
  23. Right Sidebar
  24. </div>
  25. <div class="span-24 last">
  26. Footer
  27. </div>
  28. </div>

In all layouts, note that the definition of the last column within a container is appended to the previous one, to ensure that the sum of the values of the span-x defined in a row is more than 24, and you want to know more, you can download the blueprint frame package directly in the attachment with a complete and comprehensive example.

It feels like a good CSS framework for beginners.

    • Joshuaclayton-blueprint-css-v0.9.1-0-g9be6857.zip (3.9 MB)

CSS Framework Blueprint

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.