Site logo

Archived topic

I cant get top bar spacing correct

7 replies · Started by Keith on June 24, 2020

Viewing posts 1–8 of 8

I have been looking through the forums and got the top bar widgets to float right together, but the spacing of the icons and the space between the widgets is a mess.
So far the things I have found didn't work... what am I missing?

Hi there,

Can you first removing your own CSS for the top bar and let me have a look?

Thanks :)

I removed it

So just to confirm, the desired result is to have e-mail then phone number, both on the right side?

Correct, it’s the spacing that is giving be issues - both with the widgets and the icons

Hi there,

try adding this CSS:

.top-bar-align-right .inside-top-bar>.widget:nth-child(even) {
    float: none !important;
    margin-left: 2em;
}

Thank you, that is much better. Any suggestions on how to get the icons and text to align vertically in the middle?

Be easier if your HTML was a single <a> tag for each link like so:

<a class="top-bar-link" href="mailto:what@evercom">
    <img src="url-to-image" alt="alt text" width="25" height="25" />
    Link Label 
</a>

Then you can use some CSS to align them:

.top-bar .top-bar-link {
    display: flex;
    align-items: center;
    min-height: 40px;
}
.top-bar .top-bar-link img {
    margin-right: 0.25em;
}
This archived topic is closed to new replies.