Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1181086

    Ying-Fu Li
    Participant

    Hi,

    On this site: http://dehartenvriend.nl I have put two phone numbers in the topbar. I have also used ‘ ‘ to add space between them. Now, when switching to mobile phone view the numbers are placed underneath each other but don’t align because of those ‘ ‘. Is there a runaround for this?

    #1181111

    Christopher
    Moderator

    Hi there,

    Please update your code to :

    <div class="x-column x-1-3 x-sm"><img src="http://dehartenvriend.nl/wp-content/uploads/2016/09/netherlands-flag-xs.png">&nbsp; &nbsp; &nbsp;0909 - 2356666 (€ 0,90)
    </div>
    <div class="x-column x-1-3 x-sm">
    &nbsp; &nbsp; &nbsp;<img src="http://dehartenvriend.nl/wp-content/uploads/2016/09/belgium-flag-xs.png">&nbsp; &nbsp; &nbsp;0909 - 2356666 (€ 1,15)</div>

    Hope it helps.

    #1181119

    Ying-Fu Li
    Participant

    That messes up the desktop view as well.

    #1181156

    Christopher
    Moderator

    Hi there,

    Please update topbar content to :

    <span style="display: inline-block;"><img src="http://dehartenvriend.nl/wp-content/uploads/2016/09/netherlands-flag-xs.png">&nbsp; &nbsp; &nbsp;0909 - 5553555  (€ 0,90)</span>
    <span style="display: inline-block;">&nbsp; &nbsp; &nbsp;<img src="http://dehartenvriend.nl/wp-content/uploads/2016/09/belgium-flag-xs.png">&nbsp; &nbsp; &nbsp;02 - 5884961 (€ 1,15)</span>

    Hope it helps.

    #1181559

    Ying-Fu Li
    Participant

    Nope, it is the spaces (&nbsp) that cause it.

    #1181572

    Ying-Fu Li
    Participant

    I put the (&nbsp)’s behind the first phone number which works for the mobile phone view, but not for the tablet view.

    #1181593

    Ying-Fu Li
    Participant

    Okay, so now it doesn’t work on any screen size.

    #1181607

    Joao
    Moderator

    Hi There,

    Add this code to Appereance > Customizer > Header > Topobar Content:

    <span style="display: inline-block;"><img src="http://dehartenvriend.nl/wp-content/uploads/2016/09/netherlands-flag-xs.png">&nbsp; &nbsp; &nbsp;0909 - 5553555  (€ 0,90)</span>
    <span class="span2" style="display: inline-block;"><img src="http://dehartenvriend.nl/wp-content/uploads/2016/09/belgium-flag-xs.png">&nbsp; &nbsp; &nbsp;02 - 5884961 (€ 1,15)</span>

    Add this code to Appereance > Customizer > Custom > CSS

    @media(min-width: 480px) {
    span.span2 {
      
      padding-left: 20px;
      } }
    @media(max-width: 767px) {
    span.span2 {
      
      margin-top: 10px;
      } }
    
    @media (max-width: 767px) {
    .x-topbar .p-info {
        text-align: left !important;
        margin-left: 10%;
    } }

    Adjust margin-left if necessary.

    Hope it helps

    Joao

    #1183813

    Ying-Fu Li
    Participant

    I’ll check it next thing in the morning.

    Another issue: the flag icon and the phone numbers don’t align correctly. The flag is positioned slightly lower than the text. How can I fix that?

    #1184013

    Jade
    Moderator

    Hi there,

    Please add this code in the customizer:

    .x-topbar .p-info span img {
        position: relative;
        top: -5px;
    }
    #1184319

    Ying-Fu Li
    Participant

    You guys rock!

    #1184328

    Darshana
    Moderator

    Glad we were able to help 🙂

    #1185480

    Ying-Fu Li
    Participant

    Hi,

    Adjusted that last bit of code to ‘top: -3px’. But… while it looks perfect in Safari it doesn’t look so great in Firefox, where I’d have to use ‘-10px’ to get anything aligned (but then it is too much in Safari…). Any suggestions as to why this is and how to prevent it?

    Love you guys!

    #1185913

    Rue Nel
    Moderator

    Hello There,

    After further investigation, it appears that you have inserted an invalid code in your topbar content. Please do update it and make use of this code instead:

    <span style="display: inline-block;"><img src="http://dehartenvriend.nl/wp-content/uploads/2016/09/netherlands-flag-xs.png">     0909 - 5553555  (€ 0,90pm)</span>
     <span class="span2" style="display: inline-block;"><img src="http://dehartenvriend.nl/wp-content/uploads/2016/09/belgium-flag-xs.png">     02 - 5884961 (€ 1,15pm)</span>
       <span class="span2" style="display: inline-block;"><a href="http://dehartenvriend.nl/credits/"><img src="http://dehartenvriend.nl/wp-content/uploads/2016/09/credits-flag-xs.png">     KOOP CREDITS</a></span>

    Please let us know how it goes.

    #1186229

    Ying-Fu Li
    Participant

    Okay, done but that didn’t change how it looks in Firefox. Checked Safari and Chrome and both look okay, just not Firefox.