Mike Waller
asked on
Center menu tabs over mobile
Hi there. On these pages over mobile I need to center the secondary hamburger menu tabs... https://ccdenver.org/newsroom/
Same is true on these Newsroom subpages...
https://ccdenver.org/media-center/
https://ccdenver.org/pressroom/
And also make the social media icons all on one line over mobile.
Any ideas experts?
Same is true on these Newsroom subpages...
https://ccdenver.org/media-center/
https://ccdenver.org/pressroom/
And also make the social media icons all on one line over mobile.
Any ideas experts?
ASKER
Hi there. On this page over mobile you'll see a hamburger menu and if you click on it those tabs should be centered and the social media icons should be centered and on one line... https://ccdenver.org/newsroom/
What do you think?
What do you think?
Hi
for the text menu add
for the social li
you can try this
.linkedin-icon {
background-image: url(https://ccdenver.org/wp-content/uploads/2018/07/LinkedIn-thumb_25x25.jpg);
background-repeat: no-repeat;
width: 26px !important;
height: 26px !important;
margin-top: 7px !important;
/* margin-left: 7px !important; */
vertical-align: middle;
}
You may also want to check in your JS file as some menu have hardcoded CSS class in JS.
If this is a premium template you can ask the author for support.
for the text menu add
text-align: center;
.fl-node-5b2af537cbdfc .fl-menu .menu, .fl-node-5b2af537cbdfc .fl-menu .menu > li {
font-size: 16px;
text-transform: none;
text-align: center;
for the social li
you can try this
vertical-align: middle;
and remove the margin-left.linkedin-icon {
background-image: url(https://ccdenver.org/wp-content/uploads/2018/07/LinkedIn-thumb_25x25.jpg);
background-repeat: no-repeat;
width: 26px !important;
height: 26px !important;
margin-top: 7px !important;
/* margin-left: 7px !important; */
vertical-align: middle;
}
You may also want to check in your JS file as some menu have hardcoded CSS class in JS.
If this is a premium template you can ask the author for support.
ASKER
Okay I did all of that and I see those menu tabs centered but the social media icons are not centered and on one horizontal line. Also, anyway to center that logo over mobile too?
You can use media queries https://www.w3schools.com/css/css_rwd_mediaqueries.asp
these are CSS classes that will be applied to a specific width
these are CSS classes that will be applied to a specific width
/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {...}
/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {...}
/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {...}
/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {...}
/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {...}
ASKER
Okay and how would I use those media queries to make those social media icons be on one line and centered?
Try something like
@media only screen and (max-width: 600px) {
.mycustom {
display:block;
text-align:center
vertical-align: middle;
}
}
ASKER
lenamtl, where is the css class 'mycustom' on those social media buttons?
You have to create a class 'mycustom' or anyname that not already exist in CSS file then add the class name to you menu item class="someclass mycustom otherclass"
If this not working on the li class try to add a span
If this not working on the li class try to add a span
<span class="mycustom"> icon here </span>
ASKER
The site is a Wordpress site and uses Menus. Each social media icon already has a class assigned to it such as this...
.linkedin-icon {
background-image: url(https://ccdenver.org/wp-content/uploads/2018/07/LinkedIn-thumb_25x25.jpg);
background-repeat: no-repeat;
width: 26px !important;
height: 26px !important;
margin-top: 7px !important;
/* margin-left: 7px !important; */
vertical-align: middle;
}
What do you suggest?
.linkedin-icon {
background-image: url(https://ccdenver.org/wp-content/uploads/2018/07/LinkedIn-thumb_25x25.jpg);
background-repeat: no-repeat;
width: 26px !important;
height: 26px !important;
margin-top: 7px !important;
/* margin-left: 7px !important; */
vertical-align: middle;
}
What do you suggest?
You can tried to add the following to your site css file
You have to be careful when editing the actual class, because maybe the .linkedin-icon class may be use elsewhere.
The problem with menu is often they have some hardcoded css in the Javascript...
You can try to contact the theme author too.
@media only screen and (max-width: 600px) {
.linkedin-icon {
display:block;
text-align:center
vertical-align: middle;
}
}
You have to be careful when editing the actual class, because maybe the .linkedin-icon class may be use elsewhere.
The problem with menu is often they have some hardcoded css in the Javascript...
You can try to contact the theme author too.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Have you fixed this?
I don't see a the secondary menu...
The one I see is center...