Why is CMenu putting newlines in my lists? It adds a newline after closing every ‘li’ or ‘ul’ tag and newlines surrounding nearly every “<ul options… >” (first one only has a newline after)? The white space is injecting unwanted space into my menu system. I’m tempted to edit CMenu.php and take out the 5 “\n” pieces, but I don’t want to maintain my own bug fixes to Yii or keep an extension up to date. If nothing else, it’s slightly less efficient code producing slightly less efficient html.
I can work around this by floating the list items to the left, but that notoriously causes other CSS problems, which seem to cascade into a mess that I cannot fix. Conceptually, I think of the menu items as inline-block objects, not some floating block that I want everything to flow around.
Is there any other good fix, or should I just edit CMenu.php? I’m hoping there’s something simple in Yii to prevent the spaces from being put there in the first place, but I’m not seeing anything from reading the code.