- This topic has 6 replies, 3 voices, and was last updated 2 years, 4 months ago by Ying.
-
AuthorPosts
-
November 19, 2021 at 3:10 am #2010641Ceramica Sud Curlante
Ask if it is possible to align the width of the menu items to 100%.
I tried to insert some css by myself, but I couldn’t.
I attach photos:
November 19, 2021 at 6:37 am #2010895DavidStaffCustomer SupportHi there,
try this CSS:
@media(min-width: 1700px) { .main-navigation .main-nav>ul { display: flex; } .main-navigation .main-nav>ul>li { flex: 1; } .main-navigation .main-nav>ul>li>a { padding-left: 0 !important; } }
November 19, 2021 at 10:27 am #2011375Ceramica Sud CurlanteI entered the code but unfortunately it doesn’t work.
I am attaching all the codes that I have entered, perhaps there is a conflict:
– Additional CSS:
.main-nav > ul > li.menu-item >a {
display: flex;
flex-direction: column;
align-items: center;
}.main-nav > ul > li > a >font {
font-size: 10px;
}.main-nav > ul > li > a > img {
height: 40px;
width: 40px;
}.mobile-header-sticky #mobile-header.toggled .main-nav>ul {
display: flex;
flex-wrap: wrap;
}
.mobile-header-sticky #mobile-header.toggled .main-nav>ul>li {
width: 30%;
}body .main-navigation.has-branding .inside-navigation {
align-items: flex-start;
}.woocommerce div.product div.images img {
height: 100%;
width: auto;
margin-left: auto;
margin-right: auto;
}
@media (max-width:768px){
.main-navigation .main-nav ul li a {
padding: 0 !important;
}ul#menu-menu-1 {
width: 100%;
}ul#menu-menu-1 {
justify-content: center;
}.woocommerce div.product img { height: auto !important; }
body .main-navigation.has-branding .inside-navigation {
width: 100%;
}
@media(min-width: 1700px) {
.main-navigation .main-nav>ul {
display: flex;
}.main-navigation .main-nav>ul>li {
flex: 1;
}.main-navigation .main-nav>ul>li>a {
padding-left: 0 !important;
}
}November 19, 2021 at 10:27 am #2011376Ceramica Sud CurlanteNovember 19, 2021 at 12:37 pm #2011510YingStaffCustomer SupportThe CSS should work, I don’t see it’s been added to your site, have you cleared cache after the changes are made?
Let me know 🙂
November 22, 2021 at 9:20 am #2015013Ceramica Sud CurlanteI entered “important!” in all 3 lines of code and it works …
Tell me if it’s okay and I can leave the code with this change.
It seems to me that it works fine now.
————————————-
@media(min-width: 1700px) {
.main-navigation .main-nav>ul {
display: flex !important;
}.main-navigation .main-nav>ul>li {
flex: 1 !important;
}.main-navigation .main-nav>ul>li>a {
padding-left: 0 !important;
}
}November 22, 2021 at 11:15 am #2015667YingStaffCustomer SupportSo seems the original CSS would be overridden by other existing CSS.
You can use
important
, although would recommend using more specific selector instead usingimportant
. -
AuthorPosts
- You must be logged in to reply to this topic.