My side navigation bar is cutting off half my words if they are to long, how do i get them to go onto the next line when they reach the end of the box??

This is my code that makes the side bar, if you need the CSS as well let me know.


$store_categories = $this->getLeftCategories();
if ($count = count($store_categories)) {

$block_title = $this->getBlockTitle();
if ( empty($block_title) ) $block_title = 'Categories';
<div class="block block-left-nav">
    <div class="block-title">
        <strong><span><?php echo $this->__($block_title) ?></span></strong>
    <div class="block-content">
        <ul id="left-nav">
        foreach ($store_categories as $_category) {
            $class = array();
            if (!$i) {
                $class[] = 'first';
            } elseif ($i == $count) {
                $class[] = 'last';
            echo $this->drawOpenCategoryItem($_category, 0, $class);
        } ?>
// if ($count = count($store_categories)) {
$mdms_blocks = Mage::registry('mdms_blocks');
if ( !$mdms_blocks ) {
    $mdms_blocks = array();
} else {
$mdms_blocks['block_left_nav'] = ob_get_clean();
Mage::register('mdms_blocks', $mdms_blocks);

I have also added a pic to show you what i mean.

This is the problem, text being cut off.

Thank you.

2 Answers 2


You need to edit your css for the side bar

Either reduce the font size of the text to fit in or increase the width of your sidebar.

Please provide the css

I will advice you further

  • is that the only way i can do it, cant make the text go onto the next line??
    – Adam Allen
    Commented Jun 10, 2014 at 10:11
  • yes you can modify your css to make text to the next linew. post your css please.
    – Stifboy
    Commented Jun 10, 2014 at 10:22
  • {margin:0 0 0 3px; padding:0 0 0 13px; line-height:20px; background: url("../images/arrow_item.gif") 0 8px no-repeat }
    – Adam Allen
    Commented Jun 10, 2014 at 10:32

i figured out this problem, all i did was set white spacing to normal - white-space:normal;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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