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

Home Forums Design Got an annoying niggle with my css for a responsive image gallery

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

    I’ve been hacking around with some code I found at

    to create an image swap on mouseover. Here’s what I got to

    There’s an alignment problem on mouseover as the image scrolls up about 10 px too far. Ive looked at it in chrome inspect, but I can’t see where in the css this is coming from.

    Any pointers much appreciated.



    You need to add display: block; to .boxInner img { }.

    Something I add in almost all of my projects:

    img {
        display: block;
        height: auto;
        max-width: 100%;
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design’ is closed to new topics and replies.