How to get the two block at the same size #3699
-
Okay so I have this code : <div style="display:flex; align-items:center;">
<a href="https://github.com/ArcadeCode" target="_blank">
<img id="targetImgForGetSize" src="https://github-readme-stats.vercel.app/api?username=ArcadeCode&show_icons=true&theme=material-palenight&count_private=true&hide_border=true" />
</a>
<a href="https://github.com/ArcadeCode" target="_blank">
<img id="targetImgToSetSize" src="https://github-readme-stats.vercel.app/api/top-langs?username=ArcadeCode&show_icons=true&theme=material-palenight&hide_border=true&layout=compact" />
</a>
</div> I want to have theses two div at the same size, I tried this : var img = document.getElementById("targetImgForGetSize");
var width = img.clientWidth;
var height = img.clientHeight;
var resizeImg = document.getElementById("targetImgForGetSize")
resizeImg.style.height = height+" px"
resizeImg.style.width = width+" px" But this don't work, I have search but there is no size indicator on the doc right ? Thanks if you help me ^^ |
Beta Was this translation helpful? Give feedback.
Answered by
qwerty541
Mar 18, 2024
Replies: 1 comment 4 replies
-
Hey, @ArcadeCode! Is that the result which you want to reach? In case if it is, then here is a code: <a href="https://github.com/ArcadeCode">
<img height=190 align="center" src="https://github-readme-stats.vercel.app/api?username=ArcadeCode&show_icons=true&theme=material-palenight&count_private=true&hide_border=true" />
</a>
<a href="https://github.com/ArcadeCode">
<img height=190 align="center" src="https://github-readme-stats.vercel.app/api/top-langs?username=ArcadeCode&show_icons=true&theme=material-palenight&hide_border=true&layout=compact" />
</a> |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
ArcadeCode
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, @ArcadeCode! Is that the result which you want to reach?
In case if it is, then here is a code: