Support » Fixing WordPress » How to change logo for mobile

  • Resolved sabrina34

    (@sabrina34)


    Hi,

    I have a logo image in my header.php on the stage at 100%.
    On mobile my logo become to small
    So, i d like to add an other logo image for mobile.

    Posible ?

    Tks !

Viewing 9 replies - 1 through 9 (of 9 total)
  • WPyogi

    (@wpyogi)

    Generally, that’s done in the CSS – specifics depend on your theme/site.

    sabrina34

    (@sabrina34)

    tks for your help,

    With mediaquery in css stylesheet i can manage the image size but cannot change image path 🙁

    sabrina34

    (@sabrina34)

    In my header.php i call my logo like this

    <div class=”logo”>/”><img src=”../img/logo.png”/></div>

    Could i add some condition ?

    if screen < 480 print <div><img src=”../img/logo1.png”/></div>
    else print <div><img src=”../img/logo2.png”/></div>

    i am not a php user !

    martcol

    (@hotmale)

    Target the image in your CSS using:

    div.logo img {
    }
    sabrina34

    (@sabrina34)

    tks – but i cannot do it like this :

    @media only screen and (min-width:480px) and (max-width:2000px){
    div.logo img {<img src=”../img/logo2.png”/>}}

    @media only screen and (max-width:480px){
    div.logo img {<img src=”../img/logo1.png”/>}}

    And when i try to put logo in background-image he doesn’t appear on the page 🙁

    martcol

    (@hotmale)

    Can you link to your site?

    You should leave your code in your header where it is.

    All you want to declare in the CSS is a width.

    width: 30px;

    Or whatever width you want.

    You can also use %

    width: 30%;

    sabrina34

    (@sabrina34)

    I have the 100% logo with

    Here is the website:
    http://scaryhouse.fr/

    sabrina34

    (@sabrina34)

    Ok i did it with background image

    thank for your help !

    sabrina34

    (@sabrina34)

    i close the topic 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to change logo for mobile’ is closed to new replies.