center li menu probleem

Status
Niet open voor verdere reacties.

sjoerdjek

Gebruiker
Lid geworden
6 dec 2010
Berichten
54
Hallo

ik heb echt alles wat maar kon geprobeerd..
kunnen jullie mij met dit probleem helpen ?
ik krijg mijn li menu niet gecenterd net als de rest :(

PHP:
<div id="menuh">
	<ul>	
		<li><a href="#" >Home</a></li>
	</ul>
    <ul>	
		<li><a href="#" >Over</a></li>
	</ul>
   	<ul>	
		<li><a href="#" >Prive</a>
        <ul>
        <li><a href="#" >1</a></li>
        <li><a href="#" >2</a></li>
        <li><a href="#" >3</a></li>
        </ul>
        </li>
	</ul>
       	<ul>	
		<li><a href="#" >Zakelijk</a>
        <ul>
        <li><a href="#" >1</a></li>
        <li><a href="#" >2</a></li>
        <li><a href="#" >3</a></li>
        </ul>
        </li>
	</ul> 
    <ul>	
		<li><a href="#" >Tarieven</a></li>
	</ul>       
    <ul>	
		<li><a href="#" >Contact</a></li>
	</ul>    

</div>
css:
PHP:
#menuh
	{
	font-size: small;
	font-family: arial, helvetica, sans-serif;
	position: absolute;
	
}
		
#menuh a
	{
	text-align: center;
	display:block;
	white-space:nowrap;
	margin:0;
	padding:10px 32px 10px 32px;
	border-right:1px solid #CC0033;
	border-left:1px solid  #CC0033;
	border-top:1px solid  #CC0033;
	border-bottom:1px solid  #CC0033;

	}
	
#menuh a:link, #menuh a:visited, #menuh a:active	/* menu at rest */
	{
	color: black;
	background: white;
	text-decoration:none;

	}
	
#menuh a:hover						/* menu on mouse-over  */
	{
	color:#9d1400;
	border-right:1px solid #CC0033;
	border-left:1px solid #CC0033;
	border-top:1px solid #CC0033;
	background: #FFFFCC;
	text-decoration:none;

	}	
	
#menuh a.top_parent, #menuh a.top_parent:hover  /* attaches down-arrow to all top-parents */
	{
	background-image: url(navdown_white.gif);
	background-position: right center;
	background-repeat: no-repeat;

	}
	
#menuh a.parent, #menuh a.parent:hover 	/* attaches side-arrow to all parents */
	{
	background-image: url(nav_white.gif);
	background-position: right center;
	background-repeat: no-repeat;

	}

#menuh ul
	{
	list-style:none;
	margin:0;
	padding:0;
	float:left;
	width:9em;	/* width of all menu boxes */
	/* NOTE: For adjustable menu boxes you can comment out the above width rule.
	However, you will have to add padding in the "#menh a" rule so that the menu boxes
	will have space on either side of the text -- try it */
	}

#menuh li
	{
	position:relative;
	min-height: 1px;		/* Sophie Dennis contribution for IE7 */
	vertical-align: bottom;		/* Sophie Dennis contribution for IE7 */
	}

#menuh ul ul
	{
	position:absolute;
	z-index:500;
	top:auto;
	display:none;
	padding: 1em;
	margin:-1em 0 0 -1em;
	}

#menuh ul ul ul
	{
	top:0;
	left:100%;
	}

div#menuh li:hover
	{
	cursor:pointer;
	z-index:100;
	}

div#menuh li:hover ul ul,
div#menuh li li:hover ul ul,
div#menuh li li li:hover ul ul,
div#menuh li li li li:hover ul ul
{display:none;}

div#menuh li:hover ul,
div#menuh li li:hover ul,
div#menuh li li li:hover ul,
div#menuh li li li li:hover ul
{display:block;}

kan iemand mij helpen?
 
Is het je bedoeling dat je elke li in een nieuwe ul zet?
Zo heb je erg veel ul's. Lijkt me niet dat je dat wilt.
 
je moet ook niet de a de css van text-align:center geven, je moet de li de css van text-align:center geven. De width van de a past zich automatisch aan, aan de lengte van de inhoud tussen <a> en </a>, deze kan dus niet gecentreerd worden, of met andere woorden: deze is gecentreerd, maar dat zie je niet.
 
ok mja .. ik ben niet zo goed in li menu hahha dat geeft ik echt toe.

Wat ik wil is eigenlijks een gewoon menu ( wat ik wel snap) met 2 uitklap menutjes ( wat ik niet snapt) dus bv link 1 is gewoon en link 2 ook maar link 3 en 4 kunnen uitklappen...

hoe kan ik het dan het beste doen? dat ik hem ook kan centeren op de pagina ( hier het voorbeeld www.sjoerdjekootstra.nl/dressimpress
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan