How to put two elements next too eachother

Im working what for the moment is just a twitter clone but got stuck when trying to put a picture next to my highlighted reply. reply highlight html: <div class="reply"> <div class="reply-profile"> <img src="reply_user.png" alt="Reply User Profile Picture"> <div> <span class="reply-profile-name">@Selima_8967</span> <span class="reply-content">This is bs</span> </div> </div> </div> css: .reply { background-color: #43596D; color: #FFF; padding: 10px; border-radius: 5px; margin-top: 10px; position: relative; margin-left: 40px; } Anybody knows how to do this?
No description
1 Reply
Jochem
Jochem11mo ago
if that lighter color is on the .reply class, your image should be outside of it (or the backgorund color should be on something else) it's much better to share your code using something like codepen, so people can see things in their own browsers. #How To Ask Good Questions has some tips on how to use codepen. You can use a placeholder service like https://picsum.photos to replace images with temporary placeholders

Did you find this page helpful?