forked from Makavura/html-css-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.fundamentals.css
120 lines (102 loc) · 2.18 KB
/
styles.fundamentals.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*
THIS IS A COMMENT/ALSO MULTILINE
*/
/*
BOOKS
https://wtf.tw/ref/duckett.pdf
*/
/*
BOX MODEL
https://css-tricks.com/the-css-box-model/
*/
/*
GRID
https://css-tricks.com/snippets/css/complete-guide-grid/
*/
/*
FLEXBOX
https://css-tricks.com/snippets/css/a-guide-to-flexbox/
*/
/*
RESPONSIVE WEB DESIGN
https://css-tricks.com/look-ma-no-media-queries-responsive-layouts-using-css-grid/
*/
.container{
display: grid;
justify-items: center;
align-items: center;
justify-content: center;
align-content: stretch;
gap: 1rem;
grid-template-rows: 2fr auto 2fr;
grid-template-columns: 2fr auto 2fr;
grid-template-areas:
"header header header header"
"nav-left content nav-right"
"footer footer footer footer";
}
.header{
grid-area: header;
}
.footer{
grid-area: footer;
}
.content{
grid-area: content;
}
/* Style inputs, select elements and textareas */
input[type=text], select, textarea{
width: 100%;
padding: 12px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
resize: vertical;
}
/* Style the label to display next to the inputs */
label {
padding: 12px 12px 12px 0;
display: inline-block;
}
/* Style the submit button */
input[type=submit] {
background-color: #4CAF50;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
float: right;
}
/* Style the container */
.form-container {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
margin: auto;
}
/* Floating column for labels: 25% width */
.col-25 {
float: left;
width: 25%;
margin-top: 6px;
}
/* Floating column for inputs: 75% width */
.col-75 {
float: left;
width: 75%;
margin-top: 6px;
}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
/* Responsive layout - when the screen is less than 600px wide, make the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
.col-25, .col-75, input[type=submit] {
width: 100%;
margin-top: 0;
}
}