-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
104 lines (92 loc) · 2.14 KB
/
styles.css
File metadata and controls
104 lines (92 loc) · 2.14 KB
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
/* type selectors */
h1, h2, p {
text-align: center;
}
h1, h2 {
font-family: Impact, serif;/* fallback fonts are used when the first font is not found/available */
}
h1 {
font-size: 40px;
/*override h1 default top and bottom margins*/
margin-top:0;
margin-bottom:15px;
}
h2 {
font-size: 30px;
}
hr {
height: 2px;
background-color: brown;
border-color: brown;
/* default border-width is 1 px for all edges of hr, so the total height is 4 px*/
}
body {
/* background-color: burlywood; */
background-image: url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg);
font-family: sans-serif;
padding: 20px;
}
img {
display: block;
margin-left: auto;
margin-right: auto;
margin-top: -25px;
}
/* an id selector is defined by placing a hash symbol directly in front of the element's id value */
/*#menu {*/
/* however, it's more common to use a class selector*/
.menu {
/* width: 300px; */
width: 80%;
background-color: burlywood;
/* margin: invisible space around an element */
margin-left: auto;
margin-right: auto;
/* padding-left: 20px;
padding-right: 20px;
padding-top: 20px;
padding-bottom: 20px; */
padding: 20px;
max-width: 500px;
}
.flavor, .dessert {
text-align: left;
width: 75%;
}
.price {
text-align: right;
width: 25%; /* styling the p elements as inline-block and placing them on separate lines in the code creates an extra space to the right of the first p element, causing the second one to shift to the next line.*/
/* one way to fix this is to make each p element's width a little less than 50% */
}
.item p {
display: inline-block;/* inline-block elements only take up the width of their content. need to add width property to flavor and price */
margin-top: 5px;
margin-bottom: 5px;
font-size: 18px;
}
.established {
font-style: italic;
}
.bottom-line {
margin-top: 25px;
}
.address {
margin-bottom: 5px;
}
/* FOOTER */
footer {
font-size: 14px;
}
a {
color: black;
}
/* pseudo selectors */
a:visited{
color:grey;
}
a:hover{
color: brown;
}
a:active{
color:white;
}