cfx
cfx

Reputation: 3444

Add inline css styles to Magento navigation list items

I'd like to add some inline CSS styles (e.g. padding) to my Magento navigation LIs. The call to renderCategoriesMenuHtml() in top.phtml led me to Navigation.php but I can't seem to add another argument without throwing an error.

Any help on this would be splendid!

Upvotes: 0

Views: 882

Answers (2)

ebohlman
ebohlman

Reputation: 15003

I have to go with everybody who's said inline CSS is a bad idea. If you want to add some extra CSS of your own, just put it in a separate stylesheet from the standard one and link it in as an additional stylesheet after the standard one. Remember that you can have multiple stylesheets per page, and any conflicts are resolved in favor of the one loaded last.

Upvotes: 1

Damodar Bashyal
Damodar Bashyal

Reputation: 941

try to override Navigation.php with your local Navigation.php and modify that function renderCategoriesMenuHtml()

if doesn't work, jQuery is your friend :-) Get menu item and add your new css class with jQuery and add that class to your css file. why would you use inline? It's ok though if you are using inline css through javascript.

Upvotes: 0

Related Questions