File tree Expand file tree Collapse file tree 2 files changed +30
-22
lines changed Expand file tree Collapse file tree 2 files changed +30
-22
lines changed Original file line number Diff line number Diff line change 11
11
</ head >
12
12
13
13
< body >
14
- <!-- Block elements -->
15
- < div class ="block "> I'm a block element</ div >
16
- < h1 class ="block "> I'm a block element</ h1 >
17
- < p class ="block "> I'm a block element</ p >
18
-
19
- <!-- Inline elements -->
20
- < span class ="inline "> I'm an inline element</ span >
21
- < a class ="inline "> I'm an inline element</ a >
22
- < img src ="./smoothie.jpg " alt ="smoothie " width ="100 " class ="inline " />
14
+ < ul class ="navbar ">
15
+ < li > < a href ="# "> home</ a > </ li >
16
+ < li > < a href ="# "> contact</ a > </ li >
17
+ < li > < a href ="# "> products</ a > </ li >
18
+ < li > < a href ="# "> about us</ a > </ li >
19
+ </ ul >
23
20
</ body >
24
21
</ html >
Original file line number Diff line number Diff line change 1
1
/*
2
- HORIZONTAL CENTERING
2
+ BLOCK:browser respects width/height, top/bottom margin
3
+ INLINE:browser does not respect width/height,
4
+ top/bottom margin
5
+ Navbar
6
+ list-style-type:property
7
+ descendant selectors
3
8
*/
4
9
5
- .block {
6
- background : blue;
7
- color : white;
8
- width : 300px ;
9
- margin : 2rem auto;
10
- /* margin-left: auto; */
11
- /* margin-right: auto; */
10
+ * {
11
+ margin : 0 ;
12
+ padding : 0 ;
13
+ box-sizing : border-box;
12
14
}
13
15
14
- .inline {
15
- background : red;
16
- color : white;
16
+ body {
17
+ font-family : Verdana, Geneva, Tahoma, sans-serif;
17
18
}
18
19
19
- body {
20
- text-align : center;
20
+ ul li {
21
+ list-style-type : none;
22
+ }
23
+
24
+ ul li a {
25
+ text-decoration : none;
26
+ color : red;
27
+ background : black;
28
+ letter-spacing : 2px ;
29
+ display : block;
30
+ padding : 5px ;
31
+ /* margin: 10px; */
21
32
}
You can’t perform that action at this time.
0 commit comments