Design comparison
Solution retrospective
Span without text-decoration inside a paragraph that has text-deco?
For the part that shows the large, green updated price and the crossed-out old price next to it, I wanted to style the whole paragraph with text-decoration: line-through; and then just have a span inside this paragraph that has all the large text and color styling, and text-decoration: none;
However, it seems this is not possible, since text-decoration: none; did not get rid of the line through the updated price. Eventually I just styled the whole paragraph green and with large text and had the small, crossed out part in a span with text-decoration: line-through;
It is actually easy to do it like this but I was still wondering if anyone has encountered a similar problem with a span inside a styled paragraph where you could not 'undo' the paragraph styling inside the span? Or do you have a neat solution for this type of issue?
Community feedback
- @HugoAlbuquerque1993Posted about 1 year ago
Pay attention to responsiveness between 750px and 900px. Other than that, it's perfect.
0@slowjoPosted about 1 year agoOh, I see what you mean. Thanks a lot for pointing this out! Nice reminder that it is always better to slide through the whole screen-width range instead of just checking for full screen and mobile.
1
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