Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Product Card Component with Text Animation and Button Hover

RM.Aniel 340

@anielrussel

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

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

@VincenzoMuolo

Posted

Hi there! For your request try use padding-left:1.5em; in span class.

Hope to have been helped you!

Cheers

0

RM.Aniel 340

@anielrussel

Posted

@Shirohige-96 I've tried it and different ways but did not work, thanks anyway.

0

@VincenzoMuolo

Posted

@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 GitHub
Discord logo

Join 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