开发者

Drupal Superfish Menu - controlling spacing per item

开发者 https://www.devze.com 2023-03-24 15:25 出处:网络
I\'m currently using the Danland theme for Drupal 7 and need help controlling the superfish horizontal spacing on a per item basis.

I'm currently using the Danland theme for Drupal 7 and need help controlling the superfish horizontal spacing on a per item basis.

The css for the individual items is #superfish .menu li.leaf I'm able to control the first item in my menu by using #superfish .menu li.first.leaf - same way for last item.

How do I control the 开发者_运维百科individual item spacing if the only css for those items is ...leaf ? Is the only way via javascript?

Thank you


Sure, you could use JavaScript or CSS (albeit not every browser will support the CSS route).

But your best bet may be to use a theme override, using Drupal's _hook system. The accepted answer on this question may be a good starting point.

Someone updated the code for Drupal 7 here: Drupal Override Custom Menu Template.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号