Ekstra menu / profil indhold her
1 <style>
2 #menu2 {
3 list-style-type:none;
4 margin:0;
5 padding:0;
6 text-align:left;
7 }
8 #menu2 > li {
9 display:inline;
10 margin-left:5px;
11 }
12 #menu2 a.menu-test:link, a.menu-test:visited, a.menu-test:active{
13 display:inline-block;
14 height:23px!important;
15 min-width:60px;
16 text-align:center;
17 padding:7px 5px 0 5px;
18 background: -moz-linear-gradient(top, #3db1ff 0%, #2929ff 100%);
19 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3db1ff), color-stop(100%,#2929ff));
20 background: -webkit-linear-gradient(top, #3db1ff 0%, #2929ff 100%);
21 background: -o-linear-gradient(top, #3db1ff 0%, #2929ff 100%);
22 background: -ms-linear-gradient(top, #3db1ff 0%, #2929ff 100%);
23 background: linear-gradient(to bottom, #3db1ff 0%, #2929ff 100%);
24 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3db1ff', endColorstr='#2929ff', GradientType=0 );
25 -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#3db1ff', endColorstr='#2929ff', GradientType=0)";
26 color:#ffffff;
27 -moz-border-radius:5px;
28 -webkit-border-radius:5px;
29 -khtml-border-radius:5px;
30 border-radius:5px;
31 }
32 #menu2 a.menu-test:hover {
33 color: #000000;
34 text-decoration:none;
35 -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
36 filter: alpha(opacity=80);
37 -moz-opacity: 0.8;
38 -khtml-opacity: 0.8;
39 opacity: 0.8;
40 background: -moz-linear-gradient(top, #3db1ff 0%, #2929ff 100%);
41 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3db1ff), color-stop(100%,#2929ff));
42 background: -webkit-linear-gradient(top, #3db1ff 0%, #2929ff 100%);
43 background: -o-linear-gradient(top, #3db1ff 0%, #2929ff 100%);
44 background: -ms-linear-gradient(top, #3db1ff 0%, #2929ff 100%);
45 background: linear-gradient(to bottom, #3db1ff 0%, #2929ff 100%);
46 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3db1ff', endColorstr='#2929ff', GradientType=0 );
47 -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#3db1ff', endColorstr='#2929ff', GradientType=0)";
48 }
49 </style>
50
51 <?php
52 $menuarray = array ('Home', 'News', 'Contact', 'Long Long One', 'About');
53
54 echo "<ul id="menu2">";
55 foreach ($menuarray as $link){
56 $phrase = $link;
57 $find = array(" ");
58 $replace = array("_");
59 $newphrase = str_replace($find, $replace, $phrase);
60
61 $file = strtolower($newphrase).".php";
62 echo "<li><a href="$file" class="menu-test">$link</a></li>";
63 }
64 echo "</ul>";
65 ?>
1 <style>
2 #menu3 {
3 list-style-type:none;
4 margin:0;
5 padding:0;
6 width:100%;
7 background: -moz-linear-gradient(top, #3db1ff 0%, #2929ff 100%);
8 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3db1ff), color-stop(100%,#2929ff));
9 background: -webkit-linear-gradient(top, #3db1ff 0%, #2929ff 100%);
10 background: -o-linear-gradient(top, #3db1ff 0%, #2929ff 100%);
11 background: -ms-linear-gradient(top, #3db1ff 0%, #2929ff 100%);
12 background: linear-gradient(to bottom, #3db1ff 0%, #2929ff 100%);
13 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3db1ff', endColorstr='#2929ff', GradientType=0 );
14 -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#3db1ff', endColorstr='#2929ff', GradientType=0)";
15 text-align:left;
16 }
17 #menu3 > li {
18 display:inline;
19 }
20 #menu3 a.menu-test:link, a.menu-test:visited, a.menu-test:active{
21 display:inline-block;
22 height:23px!important;
23 min-width:60px;
24 text-align:center;
25 padding:7px 5px 0 5px;
26 color:#ffffff;
27 }
28 #menu3 a.menu-test:hover {
29 color: #000000;
30 text-decoration:none;
31 background: -moz-linear-gradient(top, #348CD0 0%, #2929ff 100%);
32 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#348CD0), color-stop(100%,#2929ff));
33 background: -webkit-linear-gradient(top, #348CD0 0%, #2929ff 100%);
34 background: -o-linear-gradient(top, #348CD0 0%, #2929ff 100%);
35 background: -ms-linear-gradient(top, #348CD0 0%, #2929ff 100%);
36 background: linear-gradient(to bottom, #348CD0 0%, #2929ff 100%);
37 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#348CD0', endColorstr='#2929ff', GradientType=0 );
38 -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#348CD0', endColorstr='#2929ff', GradientType=0)";
39 }
40 </style>
41
42 <?php
43 $menuarray = array ('Home', 'News', 'Contact', 'Long Long One', 'About');
44
45 echo "<ul id="menu3">";
46 foreach ($menuarray as $link){
47 $phrase = $link;
48 $find = array(" ");
49 $replace = array("_");
50 $newphrase = str_replace($find, $replace, $phrase);
51
52 $file = strtolower($newphrase).".php";
53 echo "<li><a href="$file" class="menu-test">$link</a></li>";
54 }
55 echo "</ul>";
56 ?>
For at placere menuen i den side du ønkser er det bare at ændre følgene i #menu[2,3] i stylesheetet
1 #menu[2,3] {
2 text-align:[left, center, right];
3 }