SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Addict
    Join Date
    Aug 2009
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Drop down menu not working on website?

    Hello there,

    My website here: www.activestatedesigns.com has two drop down menus. However it's not working properly on this page: http://activestatedesigns.com/about

    It's odd cuz it works fine on the homepage but any page other than that, it won't disappear?

    Thanks,
    Lorne

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,276
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    You have a script looking for a sharebar which it can't find and is causing an error.

    If you remove this code the menu works.
    Code:
    <script type="text/javascript">jQuery(document).ready(function($) { $('.sharebar').sharebar({horizontal:'false',swidth:'70',minwidth:1000,position:'right',leftOffset:20,rightOffset:262}); });</script>
    <!-- Sharebar Plugin by Monjurul Dolon (http://mdolon.com/) - more info at: http://devgrow.com/sharebar-wordpress-plugin -->
    Fix the sharebar or remove the code if you aren't using it.

  3. #3
    SitePoint Addict
    Join Date
    Aug 2009
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply Paul.

    The sharebar is a social floating div for my posts: http://activestatedesigns.com/flagsi...ier01-coflag01 it's on the right side.

    That's odd it's affecting my pages, when it's not supposed to be there. The dropdowns work on the posts, but not my pages.

    Why would it be doing that? Do you recommend I try a different share plugin? Digg Digg plugin didn't work properly.

    Thanks,
    Lorne

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,276
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by lorne17 View Post

    That's odd it's affecting my pages, when it's not supposed to be there. The dropdowns work on the posts, but not my pages.

    Thanks,
    Lorne

    The page seems to be working now.

    If you have elements in your page that you target with JS then the JS should first check that the elements are in fact in the page or you will get an error. The error may have no effect but them again it masy break lots of things.

  5. #5
    SitePoint Addict
    Join Date
    Aug 2009
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yea it's working because I removed the code, and it broke the plugin. I think I'll find another plugin that won't mess things up.

    Thanks,
    Lorne

  6. #6
    SitePoint Addict
    Join Date
    Aug 2009
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Paul,

    Quick question, I have gotten a new social plugin, and you'll see it on the right side of my site here: www.activestatedesigns.com. however I cannot get that div positioned 10px further to the left (margin-right:-90px). I want it so the div that contains the buttons is showing on the page by 10px.

    The classes that are controlling the plugin are: class="dc-social-slick vertical right align-top" then when it's active it changes to: class="dc-social-slick vertical right align-top active". However when I put in the first class into my style.css it won't acknowledge it? What am I missing?

    HTML Code:
    .dc-social-slick vertical right align-top { margin-right:-90px !important; }
    Thanks,
    Lorne
    Last edited by Paul O'B; Sep 17, 2011 at 11:31. Reason: code tags broken

  7. #7
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,276
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    If they are all classes then you need to separate them with a dot. You use spaces in the html but in the css they will be dot separated.

    e.g.

    .dc-social-slick.vertical.right.align-top { margin-right:-90px !important; }

    Chances are you don't need all those if you are using !important anyway (IE6 doesn't understand dot seprated classes anyway).

    .dc-social-slick { margin-right:-90px !important; }

  8. #8
    SitePoint Addict
    Join Date
    Aug 2009
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Paul,

    That worked...I had to also add the active one to set at 0px so that way it would still open when clicked.

    .dc-social-slick.vertical.right.align-top { margin-right:-90px !important; }
    .dc-social-slick.vertical.right.align-top.active { margin-right:0 !important; }

    Thanks for the help.
    Lorne


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •