DIV fits an image + left/right clickable zones (link)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • samz
    New Member
    • Oct 2008
    • 3

    DIV fits an image + left/right clickable zones (link)

    Hello,
    A. CONTEXT
    My album is generated by a batch script, but DOS cannot get the size of an image file. So, the a unique picture size is defined in the script.
    http://www.airfirst.ch/b1/album_im.html (IMAGE MAP version)
    http://www.airfirst.ch/b1/album_div.html (DIV version)

    B. NAVIGATION
    - 2 half sensitive zones on each picture.
    - Click on the left/right image side to go up/down.

    C. QUESTION (for DIV version)

    To avoid the problem with pictures having different size (pic. #2 http://www.airfirst.ch/b1/PiCS/Pic002.JPG),
    how to make the DIV box to fit its content instead of using absolute value like:
    Code:
    DIV.Box {position:relative;width:360Px;height:240Px;margin:10Px 0;}
    ?
    PS: in my case, I use the image as background of a DIV

    Thanks and regards.
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    3 things:
    1) Absolutely positioned elements are removed from the normal flow and causing your divs to collapse.
    2) An ID name can only be used once on a page.
    3) You have 109 html errors and 1 CSS error.

    Comment

    Working...