File tree Expand file tree Collapse file tree 2 files changed +71
-0
lines changed
Expand file tree Collapse file tree 2 files changed +71
-0
lines changed Original file line number Diff line number Diff line change 1+ .container {
2+ display : flex;
3+ gap : 30px ;
4+ }
5+
6+ .box1 ,
7+ .box2 {
8+ width : 150px ;
9+ height : 150px ;
10+ background-color : rgb (248 , 130 , 130 );
11+ }
12+
13+ @media (min-width : 1200px ) {
14+ .box1 {
15+ width : 80% ;
16+ }
17+ }
18+
19+ @media (min-width : 992px ) and (max-width : 1199px ) {
20+ .container {
21+ flex-direction : column;
22+ }
23+ .box1 ,
24+ .box2 {
25+ width : 80% ;
26+ }
27+ }
28+
29+ @media (min-width : 768px ) and (max-width : 991px ) {
30+ .container {
31+ flex-direction : column;
32+ }
33+ .box1 ,
34+ .box2 {
35+ width : 80% ;
36+ }
37+ }
38+
39+ @media (min-width : 428px ) and (max-width : 777px ) {
40+ .container {
41+ flex-direction : column;
42+ }
43+ .box1 ,
44+ .box2 {
45+ width : 60% ;
46+ }
47+ }
48+
49+ @media (min-width : 258px ) and (max-width : 427px ) {
50+ .container {
51+ flex-direction : column;
52+ align-items : center;
53+ }
54+ }
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+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
6+ < title > Media Queries</ title >
7+ < link rel ="stylesheet " href ="./index.css " />
8+ </ head >
9+ < body >
10+ < h2 class ="media "> Media Queries</ h2 >
11+
12+ < div class ="container ">
13+ < div class ="box1 "> Box 1</ div >
14+ < div class ="box2 "> Box 2</ div >
15+ </ div >
16+ </ body >
17+ </ html >
You can’t perform that action at this time.
0 commit comments