Thread: css help needed

Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2011
    Posts
    11
    Plugin Contributions
    0

    Default css help needed

    I just implemented the css dropdown menu for my site, and it works wonderfully. The only problem is that it intermittently is out of place on the page. If I click it a few times, it usually goes back in place.
    (Please see attached).
    I don't know enough css to fix this. Do I make the positioning absolute, instead of relative?

    Thanks,
    Steven
    Attached Images Attached Images  

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: css help needed

    Advising on styling issues like this from a screenshot is impossible. We need to see the site live to help you.

  3. #3
    Join Date
    Oct 2011
    Posts
    11
    Plugin Contributions
    0

    Default Re: css help needed

    Hi, Glenn.
    It's http://ahimsatradingcompany.com
    The only problem being that it is intermittent; it happens maybe 1 out of 10 or so times.

    Thanks,
    Steven

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: css help needed

    What browser are you seeing this on? Have you tested more than one browser? Okay, I have gotten it in Firefox.
    You have this in stylesheet_header_menu.css (line 4)

    div#dropMenu {
    margin: -11px -20px 4px 20px;
    position: relative;
    text-align: center;
    width: 979px;
    z-index: 1000;
    }

    What is the odd margin set for? Removing that (or making it a straight 1px) fixes the issue immediately. Obviously I can't test to see if it fixes it on the next reload.

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: css help needed

    This is what is actually in the stylesheet rule:
    Code:
    div#dropMenu {
       width:979px;
       margin:-11 -20 4 20px;
       text-align:center;
       z-index:1000;
       position:relative;
    }
    margin:-11 -20 4 20px; is invalid; you need units on any nonzero values, so the declaration is (usually) being ignored. For some reason, though, it occasionally gets applied with px values.

    Try commenting out that line and see if any side effects turn up. Did you write that margin line, or did it come with the template?

  6. #6
    Join Date
    Oct 2011
    Posts
    11
    Plugin Contributions
    0

    Default Re: css help needed

    Glenn,
    Thanks. That worked. I had changed the original 0 15px. The 15px was giving me a problem, and I set about fixing it the wrong way. With everything zeroed out, it's fine.
    Steven

 

 

Similar Threads

  1. v150 CSS help needed...
    By WebKat in forum Templates, Stylesheets, Page Layout
    Replies: 27
    Last Post: 1 Apr 2012, 07:21 PM
  2. CSS Help needed
    By gmrm in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 21 Sep 2009, 08:47 PM
  3. CSS help needed
    By QuickInks in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 9 Feb 2009, 03:41 AM
  4. CSS help needed
    By PortMan in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 1 Dec 2006, 01:00 AM
  5. css help needed
    By awoman in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 12 Oct 2006, 10:47 AM

Posting Permissions

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