SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2002
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting ap-div to work in Firefox

    I'm trying to get a centered layout to work in Firefox. It works fine in Safari and IE:
    http://d70847.i26.inlethosting.com/

    The problem seems to be related to the class containerNested. The only style this has in it is postion:absolute (used so that a pop-up menu div under "Artists" in the menu is absolutely positioned relative to it).

    body {
    margin: 0;
    padding: 0;
    text-align: center;
    background-color: #082800;
    }
    .container {
    width: 741px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
    margin: 0 auto;
    text-align: left;
    }
    .containerNested {
    position:absolute;
    }

    Using CSS for layout purposes is relatively new to me, but I'm learning slowly. Thanks!

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1) Use position:relative on ".containerNested" instead of position:absolute.

    2) I suggest you learn how semantics apply to X/HTML. Semantics is really a very important subject when it comes to X/HTML.

    3) I suggest you read this article: http://apptools.com/rants/jsmenu.php
    I have a much higher opinion of the Suckerfish Menu System than this author, however, he does explain the pitfalls of DHTML menus well.

    I am concerned that your code is not following JavaScript Best Practices. I strongly recommend you read up on them.

    P.S. It would be helpful if you put your code between [code][/code] tags in the future.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Member
    Join Date
    Apr 2002
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much Kravvitz. I read through a couple of the links you sent as well. I generally think that 90% of sites out there suffer from unnecessary dropdown menus. Unfortunately, it was a specific request from this client.

    Cheers.

  4. #4
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are more accessible alternatives, however, including the Suckerfish variants.

    This explains the Suckerfish technique:
    http://www.htmldog.com/articles/suckerfish/dropdowns/
    and this shows some improvements to it:
    http://www.positioniseverything.net/css-dropdowns.html

    This article discusses the advantages and disadvantages of many dropdown systems.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


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
  •