PDA

View Full Version : Resolved "CSS Vertical List Menu" sub menu left ?



gevv
Jul 20th, 2010, 12:26 PM
Hello

CSS Vertical List Menu sub menu open right

http://i26.tinypic.com/fa05zb.png

How can I change sub menu open left ?

http://i26.tinypic.com/2kfo74.png



http://www.javascriptkit.com/script/script2/verticalmenu.shtml




.glossymenu, .glossymenu li ul{
list-style-type: none;
margin: 0;
padding: 0;
width: 185px; /*WIDTH OF MAIN MENU ITEMS*/
border: 1px solid black;
}

.glossymenu li{
position: relative;
}

.glossymenu li a{
background: white url(glossyback.gif) repeat-x bottom left;
font: bold 12px Verdana, Helvetica, sans-serif;
color: white;
display: block;
width: auto;
padding: 5px 0;
padding-left: 10px;
text-decoration: none;
}

.glossymenu li ul{ /*SUB MENU STYLE*/
position: absolute;
width: 190px; /*WIDTH OF SUB MENU ITEMS*/
left: 0;
top: 0;
display: none;
}

.glossymenu li ul li{
float: left;
}

.glossymenu li ul a{
width: 180px; /*WIDTH OF SUB MENU ITEMS - 10px padding-left for A elements */
}

.glossymenu .arrowdiv{
position: absolute;
right: 2px;
background: transparent url(arrow.gif) no-repeat center right;
}

.glossymenu li a:visited, .glossymenu li a:active{
color: white;
}

.glossymenu li a:hover{
background-image: url(glossyback2.gif);
}

/* Holly Hack for IE \*/
* html .glossymenu li { float: left; height: 1%; }
* html .glossymenu li a { height: 1%; }
/* End */

SB65
Jul 20th, 2010, 12:55 PM
Have a go with:


.glossymenu li ul{ /*SUB MENU STYLE*/
position: absolute;
width: 190px; /*WIDTH OF SUB MENU ITEMS*/
left: -190px;
top: 0;
display: none;
}

gevv
Jul 20th, 2010, 01:27 PM
Have a go with:


.glossymenu li ul{ /*SUB MENU STYLE*/
position: absolute;
width: 190px; /*WIDTH OF SUB MENU ITEMS*/
left: -190px;
top: 0;
display: none;
}

Thank you add left: -190px; and script edit line 13 (.style.right) problem resolved