Created
August 11, 2011 18:47
-
-
Save smbriones/1140412 to your computer and use it in GitHub Desktop.
Columns in CSS3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* To have the Title of the article reach accross the full | |
width of the article, as opposed to inline */ | |
h2 { | |
-webkit-column-span: all; | |
} | |
/* To give the article 2 columns with a width of 250px */ | |
article { | |
-webkit-column-count: 2; | |
-webkit-column-width: 250px; | |
} | |
/* To place the green box in the same place within the | |
column as in the original article. Tricky! */ | |
div .slug { | |
height: 50px; | |
background: green; | |
-webkit-column-break-before: avoid; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment