File tree Expand file tree Collapse file tree 2 files changed +92
-0
lines changed Expand file tree Collapse file tree 2 files changed +92
-0
lines changed Original file line number Diff line number Diff line change
1
+ Since it's pretty annoying to keep on doing small stuff, I'd thought let's make it practical.
2
+ Developing little pieces of frontend always takes you ages because you have to work with redundant code.
3
+ These snippets are meant to be plug and play in stead of plug and pray :-)
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
+ < html >
3
+ < head >
4
+ < meta http-equiv ="Content-Type " content ="text/html; charset=UTF-8 ">
5
+ < title > Centered Menu Setup</ title >
6
+ < style type ="text/css ">
7
+ body , ul {
8
+ margin : 0px ;
9
+ padding : 0px ;
10
+ text-align : center;
11
+ }
12
+
13
+ /** Navigation style **/
14
+ .navigation_container {
15
+ width : 800px ;
16
+ margin : 10px auto;
17
+ height : 30px ;
18
+ }
19
+
20
+ ul # menu_main ,
21
+ ul # menu_main ul {
22
+ line-height : 30px ;
23
+ list-style : none;
24
+ display : block;
25
+
26
+ }
27
+
28
+ ul # menu_main li {
29
+ display : inline;
30
+ margin : 0px 20px ;
31
+ position : relative;
32
+ }
33
+ ul # menu_main a ,
34
+ ul # menu_main a : link ,
35
+ ul # menu_main a : visited {
36
+ color : # A9532D ;
37
+ }
38
+
39
+ ul # menu_main a .active ,
40
+ ul # menu_main a : hover {
41
+ color : # FF532D ;
42
+ }
43
+
44
+ ul # menu_main ul {
45
+ display : none;
46
+ }
47
+
48
+ ul # menu_main .menu_open ul {
49
+ display : block;
50
+ position : absolute;
51
+ left : -20px ;
52
+ width : 200px ;
53
+ background : white;
54
+ border : 1px solid # CCCCCC ;
55
+ border-top : 0px ;
56
+ }
57
+ ul # menu_main ul li {
58
+ text-align : left;
59
+ display : block;
60
+ }
61
+ </ style >
62
+ </ head >
63
+ < body >
64
+ < div class ="navigation_container ">
65
+ < ul id ="menu_main ">
66
+ < li class ="navigation_item ">
67
+ < a href ="centered_menu.html "> Sub item 1</ a >
68
+ </ li >
69
+ < li class ="navigation_item ">
70
+ < a href ="centered_menu.html "> Sub item 1</ a >
71
+ < ul >
72
+ < li class ="navigation_item ">
73
+ < a href ="centered_menu.html "> Sub item 1</ a >
74
+ </ li >
75
+ < li class ="navigation_item ">
76
+ < a href ="centered_menu.html "> Sub item 1</ a >
77
+ </ li >
78
+ < li class ="navigation_item ">
79
+ < a href ="centered_menu.html "> Sub item 1</ a >
80
+ </ li >
81
+ </ ul >
82
+ </ li >
83
+ < li class ="navigation_item ">
84
+ < a href ="centered_menu.html "> Sub item 1</ a >
85
+ </ li >
86
+ </ ul >
87
+ </ div >
88
+ </ body >
89
+ </ html >
You can’t perform that action at this time.
0 commit comments