• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How to stop links from resizing my images?

Resolved: How to stop links from resizing my images?

0
By Isaac Tonny on 18/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I want my images to be links, but when I put them inside <a> tags, it shrinks a bit, which I wouldn’t like to happen.
My code:


As you see I currently don’t have any styling for a, but I have tried some, display: inline-block; didn’t work in any context, and setting all: none; or all: inherit; on a also did nothing.

Answer:

You need to set .partner a to have similar properties as .partner as the a tag wouldn’t have properties such as display: flex, then you need to create the same selector as .partner img but inside that a tag, so .partner a img.
I think, in general, the better approach is to put every image inside the a tag, and just disable the linking for the images that do not link to anywhere for less code duplication.


If you have better answer, please add a comment about this, thank you!

html
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How do I use SetWindowText with Unicode in Win32 using PowerShell?

01/04/2023

Resolved: Shopware 400 Status Error “This value is too long. It should have 255 character or less.” When I Try Updating Database Table

01/04/2023

Resolved: Using AWK to count multiple patterns in a file

01/04/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.