ThemeShaper Forums » Thematic

[closed]

align drop down menu to left

(9 posts)
  • Started 10 years ago by Sandraniubo
  • Latest reply from sloweye
  • This topic is not resolved
  1. Sandraniubo
    Member

    Hi again!, thanks so much for your previos help, it functioned great!
    But now I'm working on my blog using thematic and i have changed the position of the menu (sf-menu, float:left at the default.css file), but now i can't manage to change also the drop menu items and the rest of elements to left.
    you can see it at http://www.lacomunitatinconfesable.org/

    Please HELP ME!!!,

    Posted 10 years ago #
  2. Sandraniubo
    Member

    It's me again, i think that i ha messed up betwen left and right, thematic has it's default menu on the left part of the screen, an d i have put it on the right side, but when the dropdown sections i need also them aligned from the right, otherwise some options are out of the screen...

    i hope to have explined it more clear. Can someone help me??

    Posted 10 years ago #
  3. Hey Sandra,

    this can't be changed using CSS. To move the fly-outs to the left we would need to change supersubs.js.

    Cheers,

    Chris

    Posted 10 years ago #
  4. Sandraniubo
    Member

    thaks for your reply...but where is "supersubs.js"?, wich css archive do i have to modify?

    Posted 10 years ago #
  5. Sandraniubo
    Member

    Chris i found the supersubs.js file at thematic/library/scripts..and as i don't have no idea on javascript, the only part that seems clear to change is:

    var i=n.css("left")!==undefined?"left":"right"
    i tried all kind of combinations, but nothing seems to happens....

    can you clear it up a little bit...please..
    thanks

    Posted 10 years ago #
  6. Hey Sandra,

    sorry .. let me give you some more details. The flyout is controlled by a jQuery script (supersubs.js). The CSS is generated by that script according to the users interaction with the menu, therefore we cannot overwrite it using a CSS file.

    To change the behavior from a right flyout to a left flyout we need to rewrite the jQuery script.

    I know what needs to be changed by simulating this change using FireBug. But I still haven't checked if I have everything in the script to do the changes ..

    Cheers,

    Chris

    Posted 10 years ago #
  7. Sandraniubo
    Member

    thanks for your support..i wait for more details.

    once again thanks,,

    Cheers,

    sandra

    Posted 10 years ago #
  8. Sandraniubo
    Member

    hi, have you checked the script?, please as you have anything tell me!
    it's sad to tell but i'm quite desperate...

    Posted 10 years ago #
  9. Just in case anyone else runs into this-- I wanted the superfish menu right justified as well, and it was a little tough to figure out!

    I think supersubs.js just rewrites the align it finds in the CSS .

    The tricky thing is that when the superfish menu is brought back into view on hover (or sfHover), the default css just sets up the left aligned dropdown with this:


    .sf-menu li:hover ul,
    .sf-menu li.sfHover ul {
    left: 0;
    top: 2.5em; /* match top ul list item height */
    z-index: 99;
    }

    Seems like changing that would be easy, just setting right:0; or right:10em; as needed in the child theme CSS-- but that doesn't fix it-- because you didn't do anything to get rid of the left:0; that is still being set in the Thematic default CSS and getting scooped up by supersubs.js and whatever else does the rewriting in superfish.

    I got it to work by setting left:auto; not sure if that causes any browser issues-- if anyone knows if that's the right way to get rid of an unwanted left property in the parent theme CSS, I'd appreciate the confirmation.

    So I end up with this in my childtheme CSS:


    .sf-menu li:hover ul,
    .sf-menu li.sfHover ul {
    left: auto; /* override left property */
    right: 0; /* set right property instead */
    }

    and then right align the menu text

    .sf-menu {
    text-align: right;
    }

    But this still doesn't change second and third level menu items-- they will fly out to the right. But it looks like there is at least a partway solution for that, though I haven't tried it: http://users.tpg.com.au/j_birch/plugins/superfish/supposition-test/

    Posted 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.