Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Position of Images on Mouse over

  1. #1
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Position of Images on Mouse over

    Hi Folks,

    I have a script that on muse over on an image the image appears in the center of the screen.

    I would like to postion the enlarged image in a position of my choice on the screen and not specifically the center.

    Sizing the image is not a problem.

    If I could get some advice her it would be most appreciated
    Last edited by tech_support; 10-30-2007 at 05:33 AM.

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Please post a link to the problematic code so we can better help troubleshoot with you


    and read http://www.dynamicdrive.com/forums/s...ad.php?t=24866

  3. #3
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hi Folks,

    Thanks for the speedy reply.

    I havent posted the page yet to have a link but can produce a html file.

    Unfortunatly I cannot use the option to attach this file and am looking for an alternative to send the html file for reveiw.

    I have considered the option below but that will not allow me to post a html file.

    Your attention and response in advice will be most welcome

    Kind Regards
    ROb

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    But is your question on a Dynamic Drive script found on this site? That's what this category is for ("DD Scripts Help").

  5. #5
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question

    Hi Folks,

    I have published the page www.gnjgf.co.za/iptcour.html.

    In answer to your last question I am not sure if it is a dynamic drive script or code or. . .

    It would be appreciated if you could identify it that it hopefully is and then assist me if at all possible.

    Kind Regards
    Rob

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That's:

    http://www.javascriptkit.com/script/...ivviewer.shtml

    Not a DD script. You would need to go into the script and find where it sets the left and top of the outer container and adjust to suit.

    I'd also suggest starting over with a clean version of the script and at least get that working before asking for help. Your demo page is such a mess at the moment, I wouldn't wouldn't want to even try to fix it.
    Last edited by jscheuer1; 10-29-2007 at 05:16 PM. Reason: add info
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hi John,

    Thank very much for your openess and willingness to help.

    The mess you refer to is my attempt to copy and paste the same script to postions in the hope of getting my desired effects. I know it will get better.

    thanks again I will look at the "container" position and see what I vcan come up with.

    Kind Regards
    Rob

  8. #8
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question

    Hi John,

    Would this be the type of "container" you refer to?

    By looking at this could you tell if this is the correct place to make the necessary changes?




    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>iptcour</title>
    <meta http-equiv="Page-Enter" content="blendTrans(Duration=1)">
    <meta name="GENERATOR" content="Created by BlueVoda">
    <style type="text/css">
    div#container
    {
    width: 1160px;
    position: relative;
    margin-top: 0px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    }
    body
    {
    text-align: center;
    margin: 0;
    }
    </style>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Untitled Page</title>
    <meta name="GENERATOR" content="Created by BlueVoda">
    <script src="DV.js" type="text/javascript">


    Kind Regards
    ROb

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    No, and only one DOCTYPE, html, head, and title tag allowed per page. What you have there is style, not a container. Even if you were to determine the proper selector for the script generated container, it is doubtful that you could override its script generated positioning via style.

    What I suggested, and still do, is to get a clean version of the script working on the page. Use only one copy of the script. It would be a plus if the page validates, but at the very least avoid having duplicates of tags that are for once only use. I think the body tag is the only other one like that.

    Take your best shot at that, and then I'll have a look at it. The container is in the script and its top and left are set here:

    Code:
          with(dv.parentDV.style) {
            width = mid["width"] - (2*borderDV + 2*spaceDV);
            height = mid["height"] - (2*borderDV + 2*spaceDV);
            top = mid["top"] + borderDV + spaceDV;
            left = mid["left"] + borderDV + spaceDV;
            visibility = "visible";
          }
    I remember working on this script before a few times, it is sort of popular. It won't work in many browsers if the page has a valid DOCTYPE because dimensions and positions are given as numbers that represent pixel units, not as actual pixel units. Unless you need the script's ability to resize an image to available page/window size, you would be better off with some other script. If you are moving the image around, I doubt that the resizing routines would be of much use anyway.

    For more discussion of this script, see:

    http://www.dynamicdrive.com/forums/s...ad.php?t=23228
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #10
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Thumbs up

    Hi John,

    Thanks very much for the links and help.

    I presume that I replace the words "top" and "left" with values between the " ".

    This should work for the first column.

    Looking at th elinkit seems like you hav egone through the same exercise previously and would I be understanding that in making two arrays it was to do a similar thing to which i have set out?

    I will give the suggestions you have made some attention.

    I hav ealso cleaned up the linked page a little to veiw better but as per normal will require the advice and guidance of the folk that know.

    Thanks again
    Rob

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
  •