Start a new discussion

To start a new discussion please visit the discussions section of the GitHub home page of the project.

Discussions on GitHub

You can also search our old self-hosted forums for any useful information below but please note that posting new content here is not possible any more.

two questions, auto open and submenu width

Home Forums Older releases 0.9.x two questions, auto open and submenu width

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2396
    raoul
    Participant

    Hi,

    I found your smartmenu today and had a look at it. I like it a lot!

    There are a couple of things we hope to be able to do.

    1. Auto open an ítem on load. I managed to do that using itemActivate() and focus(). On a first level sub ítem this works well. But when using this on a sub sub ítem, there is a gap of about 10 pixels between the first and second sub menu. Any ideas?

    2. For some li items we like to add and icon right aligned. I tried something like

     
    <a>Introduction  <img src="../../../images/tick.png" /></a> 
    

    Which seems to work. However, it seems the sub menu width is set relative to the widest li ítem, which I like, but if that widest li ítem includes the icon, the icon is displayed on a new line. How would you recommend doing this?

    Thanks!
    Raoul

    Edit: it seems some HTML code is not coming through, the image tag includes float:right

    #2399
    admin
    Keymaster

    Hi, glad you like the script!

    Right to your questions:

    1) Unfortunately, I can’t understand exactly what space you are talking about without looking at a demo. So if possible, please post some kind of live demo where I could test your code.

    2) You could, for example, put the image before the item’s text (not after it) and use a code like this:

    <img src="../../../images/tick.png" />

    Then if needed, you could add a bit more right padding for the items – you can find the rule in the theme’s CSS file – e.g. .sm-blue a { ...).

    Or another option would be to use a right aligned background image with some appropriate item right padding.

    Cheers!

    #2403
    raoul
    Participant

    Thank you for your reply!

    using it as a background imafge isn’t really an option but I was able to resolve it using subMenusMinWidth although it does require a css fix Firefox.

    Raoul

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘0.9.x’ is closed to new topics and replies.