I am having trouble having a thumbnail image enlarge when I hover over it.
The image enlarges when I hover over other areas of the page not just when I hover over the image. What do you think I am doing wrong to cause this? Also if I click on the thumbnail it opens up on another page. How do I prevent it from opening up on another page. I have the code I used below
Please read our posting guidelines for some suggestions about posting code. Forum Posting Basics
We will need to see the HTML that goes with the CSS and know the dimensions of any images.
Ideally, a “working page”, one that starts with (or whatever doctype you are using) and ends with and contains the least amount of HTML and CSS to demonstrate the problem. To include the code in a post, put three backticks on a line by themselves before the code and three more backticks on a line by themselves after the code to preserve your formatting.
You can also highlite your code and click the </> symbol in the editor’s menu to preserve your formatting.
Instead of a “working page”, you might create a CodePen that demonstrates the issue or provide a link to your page.
FYI, “Fjords” is not a link.
As as example of a “working page”, I tried to create a “working page” using the code that you provided. Perhaps you can fill in some missing pieces so we will have a better idea of what you are trying to do.
Just one note in doing that @Johned22, you seem to have two closing curly braces at the end of your CSS. The browser will probably ignore it, but it’s worth just checking that you don’t have any other stray characters in your code whilst you have it open.
You have included target="_blank" in your code, which instructs the browserr to do exactly that. Remove that to have the link open in the same tab/window. (target="_blank" causes accessibility issues and as a general rule is best avoided.)