Forum Moderators: open
I need it for a client that needs to show (the previous)striked prices and then new price, a few hundreds!
that page is pure shtml and CSS
so if that would be the answer I can add a class
but which one
thank you
regards
text-decoration:line-through;
...to achieve a similar effect without the slant. Otherwise, I think you'll need to create an image to achieve the slanted effect.
The text-decoration property [w3.org]
.slant{
background:transparent url('/images/slant.gif') no-repeat center center;
}
<span class="slant">$999.00</span>
<added>I can't quite figure out how to bring the background image forward so it sits on top of the price instead of behind it.
FYI, my image is 100px wide by 15px tall. You'll need to determine your image size so that it creates a consistent effect amongst all price levels i.e. 2 digit, 3 digit, 4 digit, etc. The image is mostly white space with the red diagonal line running from lower left to upper right corner.
I tried two instances of z-index and could not bring it forward. Since this is a background image, I think it is something that is unaffected by z-index. I'm just not sure.
So now I look at that diagonal line effect and think, hmmm, I like it behind the numbers as you can see what numbers they are. If it were on top, it might obscure the number and make it unreadable. There are always two ways to look at something. ;)