1

Cant get the text in "Short Description" to align.

There is break tags being added to my product's short description on the front end product detail page that are not found in the short description when I review the product from the admin.

Any help is appreciated.

1
  • The issue is not CSS related, but rather the out-of-the-box view script for products adds a "nl2br" call on the product's short description, you just need to remove this. See my answer for how. Jan 27 '15 at 21:11
4

Open up this file: app/design/frontend/rwd/{THEME_NAME}/template/catalog/product/view.phtml

If it does not exist, copy it to your local theme from: app/design/frontend/rwd/default/template/catalog/product/view.phtml

You'll find in this file, these lines:

<?php if ($_product->getShortDescription()):?>
    <div class="short-description">
        <div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
    </div>
<?php endif;?>

Remove the "nl2br" PHP call that is in there prior to fetching the short description:

<?php if ($_product->getShortDescription()):?>
    <div class="short-description">
        <div class="std"><?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?></div>
    </div>
<?php endif;?>
0
1

I guess you're referring to the list item. To learn more about styling list items please check W3Schools and css-tricks.com for more information.

You can use the element inspector in Chrome and Firefox to get a closer look at the HTML element and it's styling.

I did notive every list item has a break (<br/>) that causes the weird space between the bullet point and the text. You can remove that by using the wysiwyg editor or directly in the html in the backend

4
  • Thank you for the comment. I did use "wysiwyg editor" in backend but it does not show <br>. I am not an IT guy, that's why I am asking a question here.
    – Russ
    Jan 27 '15 at 21:06
  • I'm afraid I can't explain it simpler than this. If you disable/turn off the wysiwyg you'll get the raw html and you should be able to see the breaks
    – Sander Mangel
    Jan 27 '15 at 21:18
  • @Sander-MageStackDay2015 It isn't WYSIWYG related. Jan 27 '15 at 21:41
  • I did see raw HTML and no breaks were visible.
    – Russ
    Jan 27 '15 at 21:58

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