This is my first question, but I'm sure there is still a lot to come. I have a little problem with the position that I would like to know, even if it is possible.
I have an unordered list ( <ul> ) with a floating <li> s, for the main options I float these left ones, and for the contact and support options I float them correctly, how good it is. Now I have a <span> inside each <li> , which I show below the horizontal list, a list for the menu. These <span> work as a description for selecting the menu, and for the usual parameters that I use position:absolute; top:30px; left:0; position:absolute; top:30px; left:0; It works as a suspect. Now I would like to change the position attributes for those menu items that I float to the right, so that the range gets position:absolute; top:30px; right:0; position:absolute; top:30px; right:0; , and it does not work at all. It seems impossible to change this with a more specific CSS rule and then another, but the float works fine.
html:
<div id="menu"> <ul> <li>Menu1<span>Info1</span></li> <li>Menu2<span>Info2</span></li> <li class="support">Support1<span>Info3</span></li> </ul>
css:
#menu{position:relative;} #menu ul{list-style:none;} #menu ul li{float:left;} #menu ul li.support{float:right;} #menu ul li span{display:none;} #menu ul li:hover span{display:block; position:absolute; top:30px; left:0;} #menu ul li.support:hover span{display:block; position:absolute; top:30px; right:0}
The last line in css doesn't matter! If anyone has an answer or a job, I really appreciate the help.
The question is answered and the problem is resolved. Check the posts of James Arons or Mercator.
html css php css-position
Tord
source share