Advanced Search

Results 1 to 8 of 8

Thread: Smooth Menu Centre Problem

  1. #1
    Join Date
    Apr 2005
    Location
    UK
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Smooth Menu Centre Problem

    Hi all have read others having the same problem, just can not ge tthe menu in the centre of my page have

    .ddsmoothmenu{
    font: italic normal 15px Georgia;
    background: #ffffff;
    width: 95%;
    float: center;
    color: #AEBBBF;

    but still wont work is there anything else i need to change.

    thanks

  2. #2
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    452
    Thanks
    76
    Thanked 21 Times in 21 Posts

    Default

    any link or screenshot that you can provide? we need to see the web layout.

    Code:
    float: center;
    this is wrong man, the value for float is left, right, none or inherit.
    _____________________

    David Demetrius // davejob
    _____________________

  3. #3
    Join Date
    Apr 2005
    Location
    UK
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok thanks tried them all and noone of them center the menu

  4. #4
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    452
    Thanks
    76
    Thanked 21 Times in 21 Posts

    Default

    we can't help you if there's no link or screenshot
    _____________________

    David Demetrius // davejob
    _____________________

  5. #5
    Join Date
    Aug 2004
    Posts
    9,863
    Thanks
    3
    Thanked 960 Times in 949 Posts
    Blog Entries
    15

    Default

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.

    URL: http://www.dynamicdrive.com/dynamici...smoothmenu.htm

    If you mean center the entire bar relative to the page, try using "margin:auto":
    Code:
    .ddsmoothmenu{
    font: bold 12px Verdana;
    background: #414141; /*background of menu bar (default state)*/
    width: 95%;
    margin:auto;
    }
    DD Admin

  6. #6
    Join Date
    Apr 2005
    Location
    UK
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry I thought you just had to put the title the script is




    .ddsmoothmenu{
    font: italic normal 15px Georgia;
    background: white; /*background of menu bar (default state)*/
    width: 100%;
    }

    .ddsmoothmenu ul{
    z-index:100;
    margin: 0;
    padding: 0;
    list-style-type: none;
    }

    /*Top level list items*/
    .ddsmoothmenu ul li{
    position: relative;
    display: inline;
    float: left;
    }

    /*Top level menu link items style*/
    .ddsmoothmenu ul li a{
    display: block;
    background: white; /*background of menu items (default state)*/
    color: white;
    padding: 2px 21px;
    border-right: 0;
    color: #2d2b2b;
    text-decoration: none;
    }

    * html .ddsmoothmenu ul li a{ /*IE6 hack to get sub menu links to behave correctly*/
    display: inline-block;
    }

    .ddsmoothmenu ul li a:link, .ddsmoothmenu ul li a:visited{
    color: #9DAEB3;
    font-family: Georgia;
    font-size: 15px;
    font-style: italic;

    }

    .ddsmoothmenu ul li a.selected{
    background: white;
    color: #cccccc;
    font-family: Georgia;
    font-size: 15px;
    font-style: italic;

    }

    .ddsmoothmenu ul li a:hover{
    background: white;
    color: #9C8652;
    font-family: Georgia;
    font-size: 15px;
    font-style: italic;

    }

    /*1st sub level menu*/
    .ddsmoothmenu ul li ul{
    position: absolute;
    left: 0;
    display: none; /*collapse all sub menus to begin with*/
    visibility: hidden;
    }

    /*Sub level menu list items (undo style from Top level List Items)*/
    .ddsmoothmenu ul li ul li{
    display: list-item;
    float: none;
    }

    /*All subsequent sub menu levels vertical offset after 1st level sub menu */
    .ddsmoothmenu ul li ul li ul{
    top: 0;
    }

    /* Sub level menu links style */
    .ddsmoothmenu ul li ul li a{
    font: italic normal 15px Georgia;
    width: 200px; /*width of sub menus*/
    padding: 5px;
    margin: 0;
    border-top-width: 0;
    border-bottom: 0;
    }

    /* Holly Hack for IE \*/
    * html .ddsmoothmenu{height: 1%;} /*Holly Hack for IE7 and below*/


    /* ######### CSS classes applied to down and right arrow images ######### */

    .downarrowclass{
    position: absolute;
    top: 15px;
    right: 7px;
    }

    .rightarrowclass{
    position: absolute;
    top: 6px;
    right: 5px;
    }

    /* ######### CSS for shadow added to sub menus ######### */

    .ddshadow{ /*shadow for NON CSS3 capable browsers*/
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    background: white;
    }

    .toplevelshadow{ /*shadow opacity for NON CSS3 capable browsers. Doesn't work in IE*/
    opacity: 0;
    }

    obviously I originaly added float center and margin auto, read on here some where but may of been a different script, but they havnt worked anyway so have removed them but its still stuck to the left

  7. #7
    Join Date
    Aug 2004
    Posts
    9,863
    Thanks
    3
    Thanked 960 Times in 949 Posts
    Blog Entries
    15

    Default

    Using margin:auto does center the entire bar relative to the page, though not the individual top menu items relative to the bar. Are you trying to accomplish the later?
    DD Admin

  8. #8
    Join Date
    Apr 2005
    Location
    UK
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    im trying to center the whole thing, have tried that and it doesnt work (

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
  •