Results 1 to 2 of 2

Thread: css design drop down menu help

  1. #1
    Join Date
    Jun 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default css design drop down menu help

    hi i have a problem with drop down menu.
    when i wrote the css code everthing look good and when i run it on ie or chrome it still good.
    the problem is when i put in sharepoint webpart the design is going bad.

    imgage of the problem : http://www.siz.co.il/my/mtwktfjjloiz.jpg

    the css code is :
    #sddm
    {
    unicode-bidi:bidi-override;
    margin: 0;
    padding: 0;
    z-index: 30;
    direction:rtl;
    }

    #sddm li
    {
    position:relative;
    float:right;
    margin: 0;
    padding: 2px;
    list-style: none;
    direction:rtl;
    font: bold 11px arial;
    background:#999;
    }

    #sddm li a.line
    {
    line-height:20px;
    display: block;
    margin: 0;
    padding: 0;
    width: 60px;
    height: 35px;
    background-image:url(gray.gif);
    color: #FFF;
    text-align: center;
    direction:rtl;
    text-decoration: none;
    }

    #sddm li a.twolines
    {
    line-height:15px;
    display: block;
    margin: 0;
    padding: 0;
    width: 70px;
    height: 35px;
    background-image:url(gray.gif);
    color: #FFF;
    text-align: center;
    direction:rtl;
    text-decoration: none;
    }

    #sddm li a:hover
    {
    background: #09F;
    direction:rtl;
    }

    #sddm div
    {
    position:absolute;
    visibility: hidden;
    margin: 0;
    padding: 0;
    direction:rtl;
    text-align:right;
    background-image:url(gray.gif);
    border: 3px solid #FFF;
    float:right;
    }

    #sddm div a
    {
    position:relative;
    display:block;
    margin: 0;
    padding: 5px ;
    width: auto;
    height:auto;
    white-space: nowrap;
    text-align: right;
    text-decoration: none;
    background-image:url(gray.gif);
    color: #FFF;
    direction:rtl;
    font: 11px arial;
    }

    #sddm div a:hover
    {
    background: #49A3FF;
    color: #000;
    position:relative;
    direction:rtl;
    }


    and the html code is:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
    <html>
    <head>
    <title>Drop-Down Menu</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link href="css/default.css" rel="stylesheet" type="text/css" id="as">

    <!-- dd menu -->
    <script type="text/javascript">
    <!--
    var timeout = 500;
    var closetimer = 0;
    var ddmenuitem = 0;

    // open hidden layer
    function mopen(id)
    {
    // cancel close timer
    mcancelclosetime();

    // close old layer
    if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

    // get new layer and show it
    ddmenuitem = document.getElementById(id);
    ddmenuitem.style.visibility = 'visible';

    }
    // close showed layer
    function mclose()
    {
    if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
    }

    // go close timer
    function mclosetime()
    {
    closetimer = window.setTimeout(mclose, timeout);
    }
    nj
    // cancel close timer
    function mcancelclosetime()
    {
    if(closetimer)
    {
    window.clearTimeout(closetimer);
    closetimer = null;
    }
    }

    // close layer when click-out
    document.onclick = mclose;
    // -->
    </script>

    </head>
    <body>

    <ul id="sddm">
    <li><a class="twolines" href="#" onmouseover="mopen('D1')" onmouseout="mclosetime()">נהלים והוראות<br/>עבודה</a>
    <div id="D1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
    <a href="#">HTML DropDown</a>
    <a href="#">DHTML DropDown menu</a>
    <a href="#">JavaScript DropDown</a>
    <a href="#">DropDown Menu</a>
    <a href="#">CSS DropDown</a>
    </div>
    </li>
    <li><a class="line" href="#" onmouseover="mopen('D2')" onmouseout="mclosetime()">טפסים</a>
    <div id="D2" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
    <a href="#">hhhhh</a>
    <a href="#">gggggggggg</a>
    <a href="#">AJAX dropdown</a>
    <a href="#">DIV dropdown</a>
    </div>
    </li>
    <li><a class="line" href="#" onmouseover="mopen('D3')" onmouseout="mclosetime()">ניהול סיכונים</a>
    <div id="D3" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
    <a href="#">Visa Credit Card</a>
    <a href="#">Paypal</a>
    </div>
    </li>
    <li><a class="line" href="#" onmouseover="mopen('D4')" onmouseout="mclosetime()">בטיחות</a>
    <div id="D4" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
    <a href="#">Download Help File</a>
    <a href="#">Read online</a>
    </div>
    </li>
    <li><a class="line" href="#" onmouseover="mopen('D5')" onmouseout="mclosetime()">מצגות</a>
    <div id="D5" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
    <a href="#">E-mail</a>
    <a href="#">Submit Request Form</a>
    <a href="#">Call Center</a>
    </div>
    </li>

    <li><a class="line" href="#" onmouseover="mopen('D6')" onmouseout="mclosetime()">תקנים</a>
    <div id="D6" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
    <a href="#">E-mail</a>
    <a href="#">Submit Request Form</a>
    <a href="#">Call Center</a>
    </div>
    </li>

    <li><a class="twolines" href="#" onmouseover="mopen('D7')" onmouseout="mclosetime()">ספריה<br/>טכנית</a>
    <div id="D7" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
    <a href="#">E-mail</a>
    <a href="#">Submit Request Form</a>
    <a href="#">Call Center</a>
    </div>
    </li>

    <li><a class="twolines" href="#" onmouseover="mopen('D8')" onmouseout="mclosetime()">ספריה<br/>מקצועית</a>
    <div id="D8" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
    <a href="#">E-mail</a>
    <a href="#">Submit Request Form</a>
    <a href="#">Call Center</a>
    </div>
    </li>

    <li><a class="twolines" href="#" onmouseover="mopen('D9')" onmouseout="mclosetime()">ניהול<br/>האיכות</a>
    <div id="D9" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
    <a href="#">E-mail</a>
    <a href="#">Submit Request Form</a>
    <a href="#">Call Center</a>
    </div>
    </li>

    <li><a class="twolines" href="#" onmouseover="mopen('D10')" onmouseout="mclosetime()">תעודות<br/>הסמכה</a>
    <div id="D10" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
    <a href="#">E-mail</a>
    <a href="#">Submit Request Form</a>
    <a href="#">Call Center</a>
    </div>
    </li>

    <li><a class="twolines" href="#" onmouseover="mopen('D11')" onmouseout="mclosetime()">פורמטים<br/>ולוגו</a>
    <div id="D11" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
    <a href="#">E-mail</a>
    <a href="#">Submit Request Form</a>
    <a href="#">Call Center</a>
    </div>
    </li>

    <li><a class="line" href="#" onmouseover="mopen('D12')" onmouseout="mclosetime()">אישורי מס</a>
    <div id="D12" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
    <a href="#">E-mail</a>
    <a href="#">Submit Request Form</a>
    <a href="#">Call Center</a>
    </div>
    </li>

    </ul>
    <div style="clear:both"></div>

    <div style="clear:both"></div>

    </body>
    </html>

  2. #2
    Join Date
    Jun 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Solved

    Manged to solved Had to put Right:0;
    to the code.

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
  •