Skip to content

Commit 87aaa2a

Browse files
committed
First commit; added centered ul-menu
0 parents  commit 87aaa2a

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed

README

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
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 :-)

centered_menu.html

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
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>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy