Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: image position

  1. #11
    Join Date
    Mar 2011
    Posts
    2,144
    Thanks
    59
    Thanked 116 Times in 113 Posts
    Blog Entries
    4

    Default

    Please use the forum's bbcode tags to make it more readable:

    for php code............[php] <?php /* code goes here */ ?> [/php]
    for html...............[html] <!-- markup goes here -->.....[/html]
    for js/css/other.......[code] code goes here................[/code]

  2. #12
    Join Date
    Apr 2012
    Location
    Chester, Cheshire
    Posts
    329
    Thanks
    7
    Thanked 35 Times in 35 Posts

    Default

    *headdesk*

    But, I couldn't help but laugh.

  3. #13
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by ApacheTech View Post
    *headdesk*

    But, I couldn't help but laugh.
    we are not amused

  4. #14
    Join Date
    Jun 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ok.sorry
    Code:
    /*-----------------------------------------------Menu-----------------------------------------*/
    .sidebarmenu ul{
    margin-left:10px;;
    padding: 0;
    list-style-type: none;
    font: 13px tahoma;
    width: 210px; /* Main Menu Item widths */
    border-bottom: 1px solid #ccc;
    direction:rtl;
    
    }
    
    .sidebarmenu ul li{
    position: relative;
    margin-top:1px;
    
    }
    
    /* Top level menu links style */
    .sidebarmenu ul li a{
    display: block;
    overflow: auto; /*force hasLayout in IE7 */
    color: white;
    text-decoration: none;
    padding: 6px;
    
    }
    
    .sidebarmenu ul li a:link, .sidebarmenu ul li a:visited, .sidebarmenu ul li a:active{
    background: url(../images/v.jpg) repeat-x ; /* of tabs (default state)*/
    }
    
    .sidebarmenu ul li a:visited{
    color: black;
    }
    
    .sidebarmenu ul li a:hover{
    background: url(../images/4.png) repeat-x 97% 50%;
    }
    
    /*Sub level menu items */
    .sidebarmenu ul li ul{
    position: absolute;
    width: 170px; /*Sub Menu Items width */
    top: 0;
    visibility: hidden;
    
    }
    
    .sidebarmenu a.subfolderstyle{
    background: url(../images/right.gif) no-repeat 97% 50%;
    }
    
    
    /* Holly Hack for IE \*/
    * html .sidebarmenu ul li { float: left; height: 1%; }
    * html .sidebarmenu ul li a { height: 1%; }
    /* End */
    but i put the image instead of .
    Code:
    sidebarmenu ul li a:link, .sidebarmenu ul li a:visited, .sidebarmenu ul li a:active{
    background: white url(../images/v.jpg) repeat-x
    }
    v.jpg =gradinat image for li
    when i use this cod ,no display righ.gif for submenu
    what can i do show me the right.gif over v.jpg?
    Last edited by faeze; 06-18-2012 at 11:05 AM.

  5. #15
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    wait, so you want the background image with the arrown on top of it?

  6. #16
    Join Date
    Jun 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yes
    arrow (right.gif) top of background image(v.jpg)

  7. #17
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    My suggestion is setting the background and then putting the image for the arrow in the HTML next to the text for the li tag.
    Bernie

  8. #18
    Join Date
    Jun 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i use s new div for righ.gif but yet no diplay for me
    in this link have javascript ,i think ,setting in java becuse by css dont change position
    Code:
    <script type="text/javascript">
    
    //Nested Side Bar Menu (Mar 20th, 09)
    //By Dynamic Drive: http://www.dynamicdrive.com/style/
    
    var menuids=["sidebarmenu1"] //Enter id(s) of each Side Bar Menu's main UL, separated by commas
    
    function initsidebarmenu(){
    for (var i=0; i<menuids.length; i++){
      var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
        for (var t=0; t<ultags.length; t++){
        ultags[t].parentNode.getElementsByTagName("a")[0].className+=" subfolderstyle"
      if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu
       ultags[t].style.right=ultags[t].parentNode.offsetWidth+"px" //dynamically position first level submenus to be width of main menu item
      else //else if this is a sub level submenu (ul)
        ultags[t].style.right=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
        ultags[t].parentNode.onmouseover=function(){
        this.getElementsByTagName("ul")[0].style.display="block"
        }
        ultags[t].parentNode.onmouseout=function(){
        this.getElementsByTagName("ul")[0].style.display="none"
        }
        }
      for (var t=ultags.length-1; t>-1; t--){ //loop through all sub menus again, and use "display:none" to hide menus (to prevent possible page scrollbars
      ultags[t].style.visibility="visible"
      ultags[t].style.display="none"
      }
      }
    }
    
    if (window.addEventListener)
    window.addEventListener("load", initsidebarmenu, false)
    else if (window.attachEvent)
    window.attachEvent("onload", initsidebarmenu)
    
    </script>

  9. #19
    Join Date
    Apr 2012
    Location
    Chester, Cheshire
    Posts
    329
    Thanks
    7
    Thanked 35 Times in 35 Posts

    Default

    I've got to head out now, but from what I've gathered from this thread, you want to change the "bullet" of a link within a list (<li></li>).

    Wouldn't this be easier by using the list-style-image property, within an li:hover selector?

    http://www.w3schools.com/cssref/pr_list-style-image.asp

    I'm afraid I don't have time to write a demo or investigate further for now, but I hope that is some help.

  10. #20
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    46
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by ApacheTech View Post
    I've got to head out now, but from what I've gathered from this thread, you want to change the "bullet" of a link within a list (<li></li>).

    Wouldn't this be easier by using the list-style-image property, within an li:hover selector?

    http://www.w3schools.com/cssref/pr_list-style-image.asp

    I'm afraid I don't have time to write a demo or investigate further for now, but I hope that is some help.
    Didn't think of that, thanks apache.
    So basically the idea then faeze is to change the bullet point n the li, to the image.

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
  •