By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,594 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

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

P: 3
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:
Expand|Select|Wrap|Line Numbers
  1. 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.
Oct 18 '08 #1
Share this Question
Share on Google+
1 Reply


drhowarddrfine
Expert 5K+
P: 7,435
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.
Oct 18 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.