|
1 | 1 | * {
|
2 |
| - margin: 0px; |
3 |
| - padding: 0px; |
4 |
| - box-sizing: content-box; |
| 2 | + margin: 0; |
| 3 | + padding: 0; |
| 4 | + box-sizing: border-box; |
5 | 5 | }
|
6 | 6 |
|
7 | 7 | body {
|
8 | 8 | font-family: sans-serif;
|
9 | 9 | line-height: 1.4;
|
10 | 10 | }
|
11 | 11 |
|
12 |
| -p { |
13 |
| - margin-bottom: 20px; |
14 |
| -} |
15 |
| -.product-description { |
| 12 | +.clearfix::after { |
| 13 | + content: ''; |
| 14 | + display: block; |
16 | 15 | clear: both;
|
17 | 16 | }
|
18 | 17 |
|
19 |
| -.product-container { |
20 |
| - border: black 4px solid; |
21 |
| - width: 900px; |
22 |
| - margin: 25px auto; |
| 18 | +.container { |
| 19 | + /* background-color: red; */ |
| 20 | + display: flex; |
| 21 | + gap: 40px; |
| 22 | +} |
| 23 | + |
| 24 | +.product-img { |
| 25 | +} |
| 26 | + |
| 27 | +/* PRODUCT */ |
| 28 | +.product { |
| 29 | + border: 4px solid black; |
| 30 | + width: 825px; |
| 31 | + margin: 50px auto; |
23 | 32 | position: relative;
|
24 | 33 | }
|
25 |
| -.product-name { |
26 |
| - background: #f7f7f7; |
27 |
| - text-transform: uppercase; |
| 34 | + |
| 35 | +.product-title { |
28 | 36 | text-align: center;
|
29 |
| - padding: 20px 0; |
| 37 | + font-size: 22px; |
| 38 | + text-transform: uppercase; |
| 39 | + background-color: #f7f7f7; |
| 40 | + padding: 15px; |
30 | 41 | }
|
31 | 42 |
|
32 |
| -.product-name::after { |
33 |
| - content: 'SALE'; |
34 |
| - position: absolute; |
35 |
| - top: 25px; |
36 |
| - left: -25px; |
37 |
| - background: red; |
38 |
| - color: white; |
39 |
| - letter-spacing: 2px; |
40 |
| - padding: 5px 5px; |
41 |
| - font-size: 12px; |
42 |
| - width: 80px; |
43 |
| - text-align: center; |
| 43 | +/* PRODUCT INFORMATION */ |
| 44 | +.product-info { |
| 45 | + /* (825 - 8 - 250 - 80) / 2 */ |
| 46 | + /* width: 243px; */ |
| 47 | + flex: 1; |
| 48 | + margin-top: 20px; |
44 | 49 | }
|
45 | 50 |
|
46 |
| -.product-details { |
47 |
| - text-transform: uppercase; |
| 51 | +.product-price { |
| 52 | + display: flex; |
| 53 | + justify-content: space-between; |
| 54 | + align-items: center; |
48 | 55 | margin-bottom: 20px;
|
49 |
| - font-size: 16px; |
| 56 | +} |
| 57 | + |
| 58 | +.price { |
| 59 | + font-size: 24px; |
50 | 60 | }
|
51 | 61 |
|
52 | 62 | .shipping {
|
| 63 | + font-size: 12px; |
53 | 64 | text-transform: uppercase;
|
54 | 65 | font-weight: bold;
|
55 | 66 | color: #777;
|
56 |
| - /* float: right; */ |
57 | 67 | }
|
58 | 68 |
|
59 |
| -.price { |
60 |
| - font-size: 25px; |
61 |
| - margin-bottom: 0px; |
62 |
| - /* float: left; */ |
63 |
| -} |
| 69 | +.sale { |
| 70 | + background-color: #ec2f2f; |
| 71 | + color: #fff; |
| 72 | + font-size: 12px; |
| 73 | + text-transform: uppercase; |
| 74 | + font-weight: bold; |
| 75 | + letter-spacing: 2px; |
| 76 | + padding: 7px 15px; |
| 77 | + display: inline-block; |
| 78 | + position: absolute; |
| 79 | + top: -17px; |
| 80 | + left: -38px; |
64 | 81 |
|
65 |
| -/* Link styling */ |
66 |
| -.homepage:link { |
67 |
| - color: #1098ad; |
| 82 | + /* width: 40px; |
| 83 | + text-align: center; */ |
68 | 84 | }
|
69 | 85 |
|
70 |
| -.homepage:visited { |
71 |
| - color: #1098ad; |
72 |
| -} |
73 |
| -.homepage:hover { |
74 |
| - color: orangered; |
75 |
| - text-decoration: none orangred; |
76 |
| -} |
77 |
| - |
78 |
| -a:link { |
79 |
| - color: black; |
80 |
| - text-decoration: underline black; |
| 86 | +.product-description { |
| 87 | + margin-bottom: 10px; |
81 | 88 | }
|
82 | 89 |
|
83 |
| -a:visited { |
| 90 | +.more-info:link, |
| 91 | +.more-info:visited { |
84 | 92 | color: black;
|
| 93 | + margin-bottom: 30px; |
| 94 | + display: inline-block; |
85 | 95 | }
|
86 | 96 |
|
87 |
| -a:hover { |
88 |
| - color: black; |
| 97 | +.more-info:hover, |
| 98 | +.more-info:active { |
89 | 99 | text-decoration: none;
|
90 | 100 | }
|
91 | 101 |
|
92 |
| -/* Other stuff */ |
93 |
| - |
94 |
| -button { |
95 |
| - width: 100%; |
96 |
| - background-color: black; |
97 |
| - text-transform: uppercase; |
98 |
| - border: black solid 5px; |
99 |
| - color: white; |
100 |
| - font-size: 18px; |
101 |
| -} |
102 |
| - |
103 |
| -button:hover { |
104 |
| - color: black; |
105 |
| - background-color: white; |
106 |
| - border: black solid 5px; |
107 |
| - /* The above can be consolidated down into: |
108 |
| - background-color: white |
109 |
| - filter:invert(100%) |
110 |
| - */ |
111 |
| -} |
112 |
| - |
113 |
| -ul { |
114 |
| - margin-left: 15px; |
115 |
| - margin-bottom: 10px; |
| 102 | +.product-colors { |
| 103 | + display: flex; |
| 104 | + gap: 10px; |
116 | 105 | }
|
117 | 106 |
|
118 |
| -ul li { |
119 |
| - list-style: square; |
120 |
| - margin-bottom: 10px; |
| 107 | +.color { |
| 108 | + background-color: #000; |
| 109 | + height: 22px; |
| 110 | + width: 22px; |
121 | 111 | }
|
122 | 112 |
|
123 |
| -nav { |
124 |
| - border: #1098ad solid 5px; |
125 |
| - background-color: #ad2510; |
126 |
| - opacity: 0.8; |
127 |
| - justify-content: center; |
| 113 | +.color-blue { |
| 114 | + background-color: #2f6ee2; |
128 | 115 | }
|
129 |
| - |
130 |
| -.colored-boxes > div { |
131 |
| - display: inline-block; |
132 |
| - width: 15px; |
133 |
| - height: 15px; |
134 |
| - margin-right: 5px; |
135 |
| - margin-bottom: 10px; |
| 116 | +.color-red { |
| 117 | + background-color: #ec2f2f; |
136 | 118 | }
|
137 |
| - |
138 |
| -.black { |
139 |
| - background-color: black; |
140 |
| - border: solid 5px black; |
141 |
| - width: 5px; |
142 |
| - height: 5px; |
| 119 | +.color-yellow { |
| 120 | + background-color: #f0bf1e; |
143 | 121 | }
|
144 |
| -.blue { |
145 |
| - background-color: blue; |
146 |
| - border: solid 5px blue; |
147 |
| - width: 5px; |
148 |
| - height: 5px; |
| 122 | +.color-green { |
| 123 | + background-color: #90cc20; |
149 | 124 | }
|
150 |
| -.red { |
151 |
| - background-color: red; |
152 |
| - border: solid 5px red; |
153 |
| - width: 5px; |
154 |
| - height: 5px; |
| 125 | +.color-brown { |
| 126 | + background-color: #885214; |
155 | 127 | }
|
156 | 128 |
|
157 |
| -.yellow { |
158 |
| - background-color: yellow; |
159 |
| - border: solid 5px yellow; |
160 |
| - width: 5px; |
161 |
| - height: 5px; |
162 |
| -} |
163 |
| -.green { |
164 |
| - background-color: #00d500; |
165 |
| - border: solid 5px #00d500; |
166 |
| - width: 5px; |
167 |
| - height: 5px; |
| 129 | +/* PRODUCT DETAILS */ |
| 130 | +.product-details { |
| 131 | + /* width: 243px; */ |
| 132 | + margin-top: 20px; |
| 133 | + flex: 1; |
168 | 134 | }
|
169 |
| -.brown { |
170 |
| - background-color: brown; |
171 |
| - border: solid 5px brown; |
172 |
| - width: 5px; |
173 |
| - height: 5px; |
| 135 | + |
| 136 | +.details-title { |
| 137 | + text-transform: uppercase; |
| 138 | + font-size: 16px; |
| 139 | + margin-bottom: 15px; |
174 | 140 | }
|
175 | 141 |
|
176 |
| -/* Floats */ |
177 |
| -.product-image { |
178 |
| - /* float: left; */ |
179 |
| - margin-right: 40px; |
| 142 | +.details-list { |
| 143 | + list-style: square; |
| 144 | + margin-left: 20px; |
180 | 145 | }
|
181 | 146 |
|
182 |
| -.product-details-container { |
183 |
| - /* background-color: yellow; */ |
184 |
| - /* width: 243px; */ |
185 |
| - height: 250px; |
186 |
| - /* float: left; */ |
187 |
| - padding: 0px 40px; |
188 |
| - /* margin-top: 20px; */ |
| 147 | +.details-list li { |
| 148 | + margin-bottom: 10px; |
189 | 149 | }
|
190 | 150 |
|
191 |
| -.shippipng-container { |
192 |
| - display: flex; |
| 151 | +/* BUTTON */ |
| 152 | +.add-cart { |
| 153 | + background-color: #000; |
| 154 | + border: none; |
| 155 | + color: #fff; |
| 156 | + font-size: 20px; |
| 157 | + text-transform: uppercase; |
| 158 | + cursor: pointer; |
| 159 | + padding: 15px; |
| 160 | + width: 100%; |
| 161 | + border-top: 4px solid black; |
193 | 162 | }
|
194 |
| -.product-info-container { |
195 |
| - /* width: 243px; */ |
196 |
| - /* background-color: blue; */ |
197 |
| - /* float: left; */ |
198 | 163 |
|
199 |
| - height: 250px; |
200 |
| - margin-right: 40px; |
201 |
| - /* margin-top: 20px; */ |
| 164 | +.add-cart:hover { |
| 165 | + color: #000; |
| 166 | + background-color: #fff; |
202 | 167 | }
|
0 commit comments