text-decoration: line-through - not ending when it should?
Page 1 of 1
text-decoration: line-through - not ending when it should?
Hi,
I am really struggling with this issue and would really like some pointers as to what I am doing wrong.
I have two prices on my site in a row like this "old price, new price"
Price one is meant to be red with a line through it price two black no line through (a common way of displaying sale prices)
I can make the fonts the correct color red/black
I can make the linethrough work but for some reason it continues on through price one AND price two - even in the same color - so I have a red line going through red old price (fine) but it refuses to end there and continues through the black new price - which shoud not be happening.
I can't see where in my code I am going wrong.
I am calling from the PHP file like this
Any help would be most welcome - thank you.
Scott
I am really struggling with this issue and would really like some pointers as to what I am doing wrong.
I have two prices on my site in a row like this "old price, new price"
Price one is meant to be red with a line through it price two black no line through (a common way of displaying sale prices)
I can make the fonts the correct color red/black
I can make the linethrough work but for some reason it continues on through price one AND price two - even in the same color - so I have a red line going through red old price (fine) but it refuses to end there and continues through the black new price - which shoud not be happening.
I can't see where in my code I am going wrong.
- Code:
.bp_old_price {
font-weight: bold;
font-size: 18px;
color: #B3484B;
text-decoration:line-through;
}
.bp_new_price {
font-weight: bold;
font-size: 18px;
color: black;
text-decoration:none;
}
I am calling from the PHP file like this
- Code:
<center>
<span class="bp_old_price">
<?php echo $box_cost, $old_price ?>
<span class="bp_new_price">
<?php echo $box_cost, $new_price ?>
</center>
Any help would be most welcome - thank you.
Scott
smokin.brit- New Member
- Posts : 1
Reputation : 1
Language : CSS
Re: text-decoration: line-through - not ending when it should?
Hi smokin.brit
CSS Code:
HTML Code:
CSS Code:
- Code:
.bp_new_price {text-decoration:line-through !important;}
.bp_old_price {text-decoration:none !important;}
HTML Code:
- Code:
<span class="bp_new_price">This is a line trought text</span>
<span class="bp_old_price">This is a simple text</span>
Guest- Guest
Similar topics
» Forum text decoration.
» Text decoration: underlined - how to move it
» How to put this line below the text, instead of above?
» Problem with text on a new line?
» How do I allign text on the same line?
» Text decoration: underlined - how to move it
» How to put this line below the text, instead of above?
» Problem with text on a new line?
» How do I allign text on the same line?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum