Submitted almost 3 years ago
Form validated using javascript and Image positioning inside div
@santhoshpsd2
Design comparison
SolutionDesign
Solution retrospective
Suggest which is better to display a image inside div as a 'img' tag or as background
Community feedback
- @IEdiongPosted almost 3 years ago
Either using the
<img>
inside a<div>
or as a background image of a<div>
, I believe both are cool, but my personal preference is as an<img>
. This is because it makes it much more easier to style and position if the layout has to change.You could also look into using the
::before
pseudo element.Shalom!
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord