File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
grid-template-columns-auto Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < title > grid-template-columns auto usage</ title >
6
+ < link rel ="shortcut icon " href ="../favicon.ico " type ="image/x-icon ">
7
+ < style >
8
+ .container {
9
+ /* enable css grid */
10
+ display : grid;
11
+ /* setup auto width for element in a middle to take
12
+ everything after 20% on a right side and 25% on left */
13
+ grid-template-columns : 20% auto 25% ;
14
+ /* setup gap between grid items */
15
+ grid-gap : 1em ;
16
+ }
17
+ .article , .sidebar {
18
+ background-color : lightgray;
19
+ padding : 1em ;
20
+ }
21
+ </ style >
22
+ </ head >
23
+ < body class ="container ">
24
+ < div class ="sidebar "> Sidebar right</ div >
25
+ < div class ="article "> Article</ div >
26
+ < div class ="sidebar "> Sidebar left</ div >
27
+ </ body >
28
+ </ html >
Original file line number Diff line number Diff line change 19
19
< li > < a href ="./grid-gap/ "> grid-gap usage</ a > </ li >
20
20
< li > < a href ="./grid-template-columns-fractions/ "> grid-template-columns fractions usage</ a > </ li >
21
21
< li > < a href ="./grid-template-columns-minmax/ "> grid-template-columns minmax together with fractions usage</ a > </ li >
22
+ < li > < a href ="./grid-template-columns-auto/ "> grid-template-columns auto usage</ a > </ li >
22
23
</ ul >
23
24
</ body >
24
25
</ html >
You can’t perform that action at this time.
0 commit comments