Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Commit 5ad5eaa

Browse files
adapting to medium and large screen sizes
1 parent 4ca01ac commit 5ad5eaa

File tree

1 file changed

+73
-11
lines changed

1 file changed

+73
-11
lines changed

cakes-co.css

Lines changed: 73 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
1-
/* Mobile First CSS */
1+
/* Default Mobile First CSS */
22
body {
33
font-family: "Arial, sans-serif";
44
margin: 0;
55
padding: 0;
66
box-sizing: border-box;
7+
background-color: #fff8f0;
78
}
89

910
header {
1011
text-align: center;
1112
padding: 1em;
12-
background-color: #f8f8f8;
13-
}
14-
15-
.logo {
16-
font-family: "Arial, sans-serif";
17-
font-style: italic;
18-
font-weight: bold;
13+
background-color: #ffb6c1;
14+
color: white;
1915
}
2016

2117
.menu-toggle {
22-
display: none;
18+
display: block;
2319
}
2420

25-
.welcome {
21+
.main {
2622
padding: 1em;
2723
}
2824

2925
.featured-cakes img {
3026
width: 100%;
3127
height: auto;
28+
border-radius: 10px;
3229
}
3330

3431
.categories {
@@ -38,8 +35,73 @@ header {
3835
padding: 1em;
3936
}
4037

38+
.category img {
39+
width: 100%;
40+
border-radius: 8px;
41+
}
42+
4143
footer {
4244
text-align: center;
4345
padding: 1em;
44-
background-color: #f8f8f8;
46+
background-color: #ffb6c1;
47+
color: white;
48+
}
49+
50+
/* Medium Screen Styles */
51+
@media (min-width: 540px) {
52+
header {
53+
padding: 1.5em;
54+
}
55+
56+
.categories {
57+
grid-template-columns: repeat(4, 1fr);
58+
gap: 20px;
59+
}
60+
61+
.featured-cakes img {
62+
width: 80%;
63+
margin: 0 auto;
64+
display: block;
65+
}
66+
67+
footer {
68+
padding: 2em;
69+
}
70+
}
71+
72+
/* Large Screen Styles */
73+
@media (min-width: 900px) {
74+
body {
75+
max-width: 1200px;
76+
margin: 0 auto;
77+
}
78+
79+
header {
80+
display: flex;
81+
justify-content: space-between;
82+
align-items: center;
83+
}
84+
85+
.main {
86+
display: flex;
87+
justify-content: space-between;
88+
}
89+
90+
.featured-cakes img {
91+
width: 60%;
92+
height: auto;
93+
}
94+
95+
.welcome {
96+
width: 40%;
97+
padding: 2em;
98+
}
99+
100+
.categories {
101+
grid-template-columns: repeat(4, 1fr);
102+
}
103+
104+
footer {
105+
padding: 3em;
106+
}
45107
}

0 commit comments

Comments
 (0)