[Resolved] Mobile Logo

Home Forums Support [Resolved] Mobile Logo

Home Forums Support Mobile Logo

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #276584
    Andy

    Hi,
    I’m using the hide-on-mobile, hide-on-tablet and hide-on-desktop classes to display a different logo for mobiles.

    Currently the mobile logo displays all the way upto 767px, I would like to change that to a max of 480px and then display the desktop/tablet logo on anything 481px+.

    I’m comfortable with CSS but not quite sure how to approach this one.

    #276700
    Tom
    Lead Developer
    Lead Developer

    Try this CSS:

    @media (min-width: 481px) {
        .hide-on-mobile {
            display: block !important;
        }
    }
    #276756
    Andy

    Thanks but with this added I see both mobile and desktop/tablet logos between 481px and 767px.

    #276810
    Tom
    Lead Developer
    Lead Developer

    Any chance you can link me to the page?

    #276938
    Andy
    #277034
    Tom
    Lead Developer
    Lead Developer

    This might work better:

    @media (max-width: 480px) {
        .hide-on-mobile {
            display: none !important;
        }
    }
    
    @media (max-width: 1024px) and (min-width: 481px) {
        .hide-on-tablet {
            display: none !important;
        }
    }
    #277057
    Andy

    Almost, but now between 481px and 767px neither logo displays, its a real brain teaser this one :s

    #277067
    Andy

    I figured it out, just had to also add:

    @media (max-width:767px) {
    	
    	.hide-on-mobile {
        display: block!important;
       }
    }
    #277151
    Tom
    Lead Developer
    Lead Developer

    Glad you got it working – it was a brain teaser for some reason lol

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.