如何使用CSS在左侧显示子子菜单?

时间:2022-11-20 07:40:39

I want to display the sub sub menu in the left side instead in the right side

我想在左侧显示子子菜单而不是在右侧

Here's the link: https://www.homecredit.ph/testEnvironment/

这是链接:https://www.homecredit.ph/testEnvironment/

Here's the CSS:

这是CSS:

/*-Main Menu-*/
#site-navigation .menu > ul > li:hover > a:before, #site-navigation .menu > ul > li.current_page_item > a:before, #site-navigation .menu > ul > li.current-menu-item > a:before, #site-navigation .menu > ul > li.current_page_ancestor > a:before, #site-navigation .menu > ul > li.current-menu-ancestor > a:before{ text-decoration: none; content: ""; height: 5px; left: 0; position: absolute; top: -5px; width: 100%; }
.logo-center #site-navigation .menu > ul > li:hover > a:before, .logo-center #site-navigation .menu > ul > li.current_page_item > a:before, .logo-center #site-navigation .menu > ul > li.current_page_ancestor > a:before, .logo-center #site-navigation .menu > ul > li.current-menu-ancestor > a:before{ display: none; }
#site-navigation .menu ul ul{ background: none repeat scroll 0 0 #FFF; border-bottom: 2px solid #d31716; border-top: 2px solid #d31716; box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2); display: none; left: 0; position: absolute; top: 100%; transition: all 0.3s ease-in-out 0s; z-index: 99999; font-family: 'Open Sans Bold', sans-serif; }
#site-navigation .menu li:hover > ul{ display: block; }
#site-navigation .menu ul ul li{ border-bottom: 2px solid #DDD; display: block; font-size: 13px; line-height: 20px; margin: 0 !important; text-align: left; }
#site-navigation .menu ul ul li:last-child{ border-bottom: none; }
#site-navigation .menu ul ul li a{ color: #666; display: block; font-weight: 300; min-width: 140px; padding: 10px 15px; position: relative; text-decoration: none; }
#site-navigation .menu ul ul li > a:hover:before, #site-navigation .menu ul ul li.current_page_item > a:before{ background: #F0563D; content: ""; height: 2px; left: 0; position: absolute; top: -2px; width: 100%; }
#site-navigation .menu ul ul li > a:hover, #site-navigation .menu ul ul li.current_page_item > a{ color: #d31716; }
#site-navigation .menu ul ul ul{ top: -2px; left: 100%; }

/*-With Sub pages-*/
#site-navigation .menu > ul > li.menu-item-has-children > a:before{ color: #FFF; content: '\f107'; font-family: FontAwesome; font-size: 10px; vertical-align: 1px; }
#site-navigation .menu > ul > li.menu-item-has-children > a::after{ content: '\f107'; font-family: FontAwesome; font-size: 14px; margin-left: 7px; vertical-align: 1px; }
#site-navigation .menu > ul > li > ul > li.menu-item-has-children > a::after{ color: rgb(34, 34, 34); content: '\f105'; font-family: FontAwesome; font-size: 10px; vertical-align: 1px; float: right; }

1 个解决方案

#1


7  

I've checked your site. Just add the below CSS:

我检查了你的网站。只需添加以下CSS:

#site-navigation .menu ul ul ul{
    right: 100%;
    left: auto;
}

#1


7  

I've checked your site. Just add the below CSS:

我检查了你的网站。只需添加以下CSS:

#site-navigation .menu ul ul ul{
    right: 100%;
    left: auto;
}