Submitted about 2 years ago
Product Card Component with Text Animation and Button Hover
@anielrussel
Design comparison
SolutionDesign
Solution retrospective
How can you adjust the position of the span element? I've tried it using css margin but it did not move.
Community feedback
- @VincenzoMuoloPosted almost 2 years ago
Hi there! For your request try use
padding-left:1.5em;
in span class.Hope to have been helped you!
Cheers
0@anielrusselPosted almost 2 years ago@Shirohige-96 I've tried it and different ways but did not work, thanks anyway.
0@VincenzoMuoloPosted almost 2 years ago@anielrussel Hi, you could consider to change the html and doing something like this:
HTML
<div class="price_container"> <h1>149.99$</h1> <span>169.99$</span> </div>
CSS
.price_container{ display:flex; align-items:center; gap:1.5em; } .price_container span{ text-decoration: line-through; }
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