The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Changing CSS, media queries

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #154087

    Hello everybody,

    This is my first post here!

    I’m making a website that’s also working on mobile devices. But there’s only one problem. I’ve a logo in the menu if I’m making the window smaller like smaller than 500px the logo is to big for it. How can I change the image with the other image? that’s only working with the width of 500px and less. I think I need CSS media queries but how exactly like: @media ….. img.logo{ src: logo2.png; } }

    This isn’t working for me, I also think its a wrong way but I hope there’s a answer for it.

    Thanks, Niels


    @media all and (max-width: 500px) {
    img.logo {src: logo2.png;}
    try this one


    Not sure that will work.

    src is not a css property.

    If the image is inline then javascript will be required .

    If it’s a bg image the you could just swap it out using a revised bg-image url in the media query.

    We need to see the actual HTML/CSS to determine which would work best for you.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.