Forums

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

Home Forums CSS image changes position on hover with float left Reply To: image changes position on hover with float left

#245343
bearhead
Participant

It’s happening because the 1px border that you’re adding on hover is making the .middlegallery divs too big.

Assuming that you want a black border to appear within the grey border on hover, I would move the :hover state to middlegallery and create an :after selector for it with an inset box shadow (instead of the border).

demo:
http://codepen.io/kvana/pen/zKGrov