The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

text-decoration: line-through - not ending when it should?

Go down

text-decoration: line-through - not ending when it should? Empty text-decoration: line-through - not ending when it should?

Post by smokin.brit November 7th 2011, 2:48 pm

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.

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


avatar
smokin.brit
New Member

Posts : 1
Reputation : 1
Language : CSS

Back to top Go down

text-decoration: line-through - not ending when it should? Empty Re: text-decoration: line-through - not ending when it should?

Post by Guest November 8th 2011, 1:33 pm

Hi smokin.brit

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>
avatar
Guest
Guest


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum