0

Current Output

enter image description here

HTML

<div class="price-box">
    <p class="special-price" style="float: left;">
            <span class="price" id="product-price-475">£349.99</span>
    </p>
    <p class="old-price" style="float: left;">
            <span class="price" id="old-price-475">£399.99</span>
    </p>
</div>

Now I need to reduce center blank space as follows

enter image description here

  • Maybe have the problem with your class file, I just checked in pen it's working. Please provide in details(CSS or Url) – Rajiv May 3 '17 at 14:17
  • goo.gl/UNhPOg this is the page – Doodu May 3 '17 at 14:39
0

This is hard to say without viewing all your code, if you can't track down what's causing the gap (is there any padding/margin?) then you could just move the 'was' price to the left with some CSS like this:

margin-left: -10px;

Or

position: relative;
right: 10px;

Also, I would avoid writing inline styles. It's pretty poor practice and can make maintenance a nightmare.

| improve this answer | |
  • goo.gl/UNhPOg this is page. Yeah, I wont use inline styles. I did it just explain here. – Doodu May 3 '17 at 14:40
  • we cannot use margin-left, when the special price goes 4 or 5 digit then the old price will be above the special price – Doodu May 3 '17 at 14:47
  • Have you updated the site? As I can't replicate it in Chrome on OSx. – Ben Crook May 3 '17 at 15:10
0

Here is the output!!

.product-view .product-shop .white-back .price-box .special-price .price {
font-size: 45px;
float: left;
position: relative;
right: 10%;

.product-view .product-shop .white-back .price-box .old-price .price {
float: left;
margin-top: 18px;
color: #c2812f;
position: relative;
left: 40%;
| improve this answer | |
  • It will add blank space in the middle when you close the inspect element – Doodu May 3 '17 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.