The Absolute Beginner’s Guide to HTML and CSS by Kevin Wilson

The Absolute Beginner’s Guide to HTML and CSS by Kevin Wilson

Author:Kevin Wilson
Language: eng
Format: epub
ISBN: 9781484292501
Publisher: Apress


Between each column, you’ll find a gutter, and at either side of the grid, there is a margin.

To construct the grid view in CSS, first we calculate the percentage for one column:

100% / 12 x 1 columns = 8.33%.

The next column would be 100% / 12 x 2 = 16.66%.

The next column: 100% / 12 x 3 = 25%.

And so on….

Next, we need to make one class for each of the 12 columns and the percentage sizes we calculated in the previous step:.col-1 {width: 8.33%;}

.col-2 {width: 16.66%;}

.col-3 {width: 25%;}

.col-4 {width: 33.33%;}

.col-5 {width: 41.66%;}

.col-6 {width: 50%;}

.col-7 {width: 58.33%;}

.col-8 {width: 66.66%;}

.col-9 {width: 75%;}

.col-10 {width: 83.33%;}

.col-11 {width: 91.66%;}

.col-12 {width: 100%;}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.