Hi, i've a simple code of a web page formed by a body, a menu and nested titles inside the menu..
What i want is that elements inside to te menu are vertically positioned at centre of it, so, margin-top of title should is 50%

The problem is that the code doesn't work, and seems that percentage always refers to the body height element instead of menu height..
My doubt is: positions setted in percentage, always refers to direct parent of an element, or deep hierarchies are not supported, so, it alway refers to the body?


PHP Code:

<body>

<
div id="menu">
   <
div id="info">INFO</div>
</
div>

</
body>


questo  il CSS 

PHP Code:

html
body
{  
    
width100%;
    
height100%;
    
margin0;
    
padding0;
  
}


#menu
{
   
position:relative;
   
top0
   
left0
   
backgroundrgba(01022060.5);
   
min-width100%;
   
min-height:4%;
   
max-height:4%;
   
color:#FFF;
   
float:left;
 
}

#menu div#info
{
   
margin-left:7%;
   
margin-top:50%;
   
float:left;