#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    14
    Rep Power
    0

    Position of menu


    Hi

    I recently got the action I want. But I want the position of the menu item to be below the menu option.

    Here is the code:

    Code:
    <a href="mediamenu.html"><img style="fixed" src="mediaoption.jpg" onMouseOver="this.src='mediamenu.jpg'" onMouseOut="this.src='mediaoption.jpg'"  /></a>
    mediamenu.jpg is the menu item I want to appear under mediaoption.jpg
  2. #2
  3. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,041
    Rep Power
    119
    For some reason, when I first read your question; I was thinking this was a basic CSS question. I re-read your question and realized; you need dhtml. So do an online search for "dhtml element positioning".
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    14
    Rep Power
    0
    Hi


    Thanks for that.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    14
    Rep Power
    0
    hi again

    I have tried dhtml positioning but I cannot get it to work.


    Here is what i have in code:


    Code:
    <p><a href="mediamenu.html"><img style="position: relative; top: 10px; left: 10px;" src="mediaoption.jpg"  onMouseOver="style='position: relative; left: 10px; top: 65px';this.src='mediamenu.jpg'" onMouseOut="this.src='mediaoption.jpg'"  /></a></p>
    The image mediaoption.jpg is 123x55
  8. #5
  9. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,041
    Rep Power
    119
    Ok, I think you got a little mixed up with the difference between a CSS "inline style attribute" and a JavaScript "inline onmouseover/onmouseout event". Plus..., your using image flips and you really need to being using CSS for that; instead of JavaScript. So here is a basic example of a navigation menu with sub-menu(s): http://css-tricks.com/simple-jquery-dropdowns/. It uses CSS & jQuery (which is a JavaScript Library, that makes coding JavaScript; so much simpler and I would advise you to broadening your horizon on jQuery); to create a DHTML menu. Please take a look at this example and you will see how to make this work better than your initial approach. If you would like a more JavaScript based approach or... only a CSS based approach; to what your wanting to do; do an online search for "dhtml drop down menu" and/or "css drop down menu". Good Luck
    Last edited by web_loone08; April 25th, 2013 at 10:59 PM.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    14
    Rep Power
    0
    Hi

    Thanks for that. Problem solved with a software program.

IMN logo majestic logo threadwatch logo seochat tools logo