0

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.

<?php
ob_start();

$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>
    <div class="block-content">
        <ul id="left-nav">
        <?php
        $i=0;
        foreach ($store_categories as $_category) {
            $class = array();
            if (!$i) {
                $class[] = 'first';
            } elseif ($i == $count) {
                $class[] = 'last';
            }
            echo $this->drawOpenCategoryItem($_category, 0, $class);
            $i++;
        } ?>
        </ul>
    </div>
</div>
<?php
} 
// if ($count = count($store_categories)) {
$mdms_blocks = Mage::registry('mdms_blocks');
if ( !$mdms_blocks ) {
    $mdms_blocks = array();
} else {
    Mage::unregister('mdms_blocks');
}
$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

0

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

3
  • is that the only way i can do it, cant make the text go onto the next line??
    – Adam Allen
    Jun 10, 2014 at 10:11
  • yes you can modify your css to make text to the next linew. post your css please.
    – Stifboy
    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
    Jun 10, 2014 at 10:32
0

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 that you have read and understand our privacy policy and code of conduct.

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