I'm currently working on a project using jQuery and CSS. I encountered an issue when using the mouseenter
event to add a border around an image, as it affects the layout by extending outside of the image container. This causes the design to look unattractive. Is there a way to apply the border inside the image so that the container remains the same size without impacting the layout? The only solution I can think of is resizing the image within the mouseevent
, but this approach seems cumbersome and prone to potential issues such as responsiveness problems.