[css] li met float:left centreren.

Overzicht Reageren

Sponsored by: Vacatures door Monsterboard

Boris Mattijssen

Boris Mattijssen

25/06/2009 10:01:00
Quote Anchor link
Hallo allemaal,

Ik zit met een probleem. Ik wil een li met float:left centreren.
Dit is het menu: http://test.feestenfeest.nl/test/ (het gaat om het grijze topmenu)

Dit is de css die ik er voor gebruik:
Code (php)
PHP script in nieuw venster Selecteer het PHP script
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
#top_menu {
    width: 1024px;
    padding: 5px 0 5px 0;
    background: #d9dadb url(../_img/menu/top_bg.gif);
    background-repeat: repeat-x;
    margin:0 auto;
}
#top_menu ul {
    list-style-type: none;
    margin:  0;
    padding: 0;
}
#top_menu ul li {
    float: left;
    min-width: auto;
    width: auto;
}
#top_menu ul li a {
    font-family: arial;
    font-size: 10pt;
    font-weight: bold;
    color: #414141;
    text-decoration: none;
    line-height: 24px;
    height: 24px;
    padding-right: 10px;
    padding-left: 10px;
}
#top_menu .selected {
    background: url(../_img/menu/top_actief.gif) repeat-x;
}

#top_menu .selected a {
    color: white;
}


Maar ik wil dus dat de tweede regel van dat menu gecentreerd is.
Ik heb alleen geen idee.

Kan iemand mij hier helpen?

Groeten,
Boris
 
PHP hulp

PHP hulp

26/04/2024 06:07:53
 
Robert Deiman

Robert Deiman

25/06/2009 10:53:00
Quote Anchor link
Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
#top_menu ul {
    list-style-type: none;
    margin:  0;
    padding: 0;
        text-align:center;
}
#top_menu ul li {
        display:inline;
    min-width: auto;
    width: auto;
        margin:0px auto;
}
 
Boris Mattijssen

Boris Mattijssen

25/06/2009 13:04:00
Quote Anchor link
Bedankt! =D

Het werkt helemaal. Top!
 



Overzicht Reageren

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.