Design comparison
SolutionDesign
Solution retrospective
How can I align text with an image? I would appreciate your help
Community feedback
- @MelvinAguilarPosted 12 months ago
Hello there ๐. Good job on completing the challenge !
-
It seems you've already aligned the text with the image using
display: flex
andalign-items: center
, which is a good approach. However, the issue with the text being pushed down, it might be due to themargin-top: 15px
in your.text p
styles..text p { color: var(--soft-blue); font-size: 14px; margin-top: 15px; /* This is the main issue - this margin is pushing down the paragraph, preventing proper alignment. */ font-weight: 300; } /* You can clear the margin using this, and it should center correctly. */ .static p { margin: 0; }
I hope you find it useful! ๐
Happy coding!
Marked as helpful1@ParvizAzerogluPosted 12 months ago@MelvinAguilar Thank you for your help. This solution solved the problem ๐
0 -
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