By Rob L on
I'm trying to remove line breaks from the list generated by my primary links, ie I want to change this:
<li>Apples</li>
<li>Pears</li>
<li>Bananas</li>
to this:
<li>Apples</li><li>Pears</li><li>Bananas</li>
This is to sort out some CSS problems I'm having in displaying a horizontal list without gaps between the items.
I've tried removing the new line character from theme_menu_item but this only seems to change my other menus - not the primary links.
Grateful for suggestions.
Comments
Drupal 6
Should have mentioned this is using Drupal 6, if that makes a difference.
Try usingf the Devel module
That way you can see what theme function or template you can override to remove the linebreaks.
- Arie
this should help
Try to find all /li in /includes/theme.inc and /includes/menu.inc and if there is \n after
</li>remove it.Remove them all to get sure ;)
exp:
before :
$output .= ' <li>'. $message ."</li>\n";after:
$output .= ' <li>'. $message ."</li>";Removing line breaks from links
I found this solution, it removes all line breaks after
<li></li>put this code into your template.php (remove the <?php ?>)