Forum » Client-Side scripting » Menu doet raar
Bezig met project
Berichten: 860
avatar
Offline Stuur privebericht
Hallo,

Ik liep zojuist tegen een probleem aan, ik krijg de tekst in mijn menu niet goed.

De index.html:
Code | Selecteer Alles
minimaliseren
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl">
        <
head>
                <
title>Layout1</title>
                
                <
link rel="stylesheet" type="text/css" href="opmaak.css" />
        </
head>
        
        <
body>
        
                 <
div id="header">
                     <
h1>Layout1!</h1>
                     <
h2>Gewoon even kijken of het werkt!</h2>
                 </
div>
                 
                 <
ul id="menu">
                    <
li class="activate"><a href="#">Home</a></li>
                    <
li><a href="#">Over</a></li>
                    <
li><a href="#">Blog</a></li>
                    <
li><a href="#">Crew</a></li>
                    <
li><a href="#">Contact</a></li>
                </
ul>
                    
        
        </
body>
        
</
html>


En de opmaak.css:
Code | Selecteer Alles
minimaliseren
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
html
       
{
      
background-color#999999;
    
}
body
        
{
        
width698px;
        
border-left1px solid #888888;
        
border-right1px solid #888888;
        
margin0px auto;
    }
div#header
        
{
        
background-imageurl('images/header.gif');
        
background-repeatrepeat-x;
        
width698px;
        
height82px;
    }
h1
        
{
        
font-familyVerdana;
        
font-size26px;
        
color#ffffff;
        
font-weightnormal;
        
margin0;
        
padding22px 0px 0px 19px;
        
floatleft;
    }
h2
        
{
        
font-family"Times New Roman";
        
font-size11px;
        
color#ffffff;
        
font-weightnormal;
        
margin0;
        
padding26px 0px 0px 12px;
        
floatleft;
    }
ul#menu
        
{
        
margin0px;
        
padding-left10px;
        list-
stylenone;
        
height25px;
        
width688px;
        
background-color#080808;
        
background/imageurl('images/menuback.gif');
    }
ul#menu li
       
{
       
floatleft;
       
height25px;
    }
ul#menu li a
        
{
        
displayblock;
        
overflowhidden;
        
height25px;
        
padding5p 8px 0px 8px;
        
font-familyVerdana;
        
color#ffffff;
        
font-size11px;
        
text-decorationnone;
        
font-weightbold;
    }
ul#menu li a:hover, ul#menu li.active a, ul#menu a:hover
        
{
         
padding5px 8px 0px 8px;
         
background-color#ffffff;
         
color#000000;
         
height20px;
    }


Live demo:
http://192.criminals-hosting.nl/Layout1
Laatst gewijzigd door Guitar op 2010-09-03 11:54:04
2010-09-03 11:50:55
Dit topic is 107 keer bekeken door 27 verschillende leden
Reacties op: "Menu doet raar"
1
R. Jipping
Berichten: 1502
avatar
Offline Stuur privébericht
bij menu li a.

even een margin left toevoegen?
2010-09-03 12:13:35
Bezig met project
Berichten: 860
avatar
Offline Stuur privébericht
Werkt niet, iemand anders met de oplossing?
2010-09-03 12:21:58
Luc
devow.nl
Berichten: 1514
avatar
Offline Stuur privébericht
Oplossing

css:

#ul menu

Maar beter is:

een div maken die jij id menu geeft
en dan in css

#menu ul a etc..
2010-09-03 12:27:54
Reageer op: "Menu doet raar"
1
Je kan niet reageren omdat je niet bent ingelogd. Inloggen of Aanmelden