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
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. (IMAGE MAP version) (DIV version)

- 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,
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

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.