Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Div image container
03-01-2009, 08:17 AM #1
- Join Date
- Feb 2009
- Thanked 0 Times in 0 Posts
Div image container
I am making a website. In the right side of my page there are buttons and website is not in english language or not compataible for dreamweaver. I have to convert the text to gif images. I want when i click to a button the came in div container. Actullay I succes to do this when i am clicking the image is coming on div but i have these following problems.
1: I have set div on my page. When i am clicking on a button div is moving without overflow in preveiw mode. My div is absoulte.
2: When i clicking in a button the image in coming but when i click the next button the next image is coming on the bottom side of the first image. Which i dont want. I want when i click the button only that image came on div. Each button have a image.
Waiting for your replies
03-01-2009, 08:59 AM #2
Firstly, it would help if we could see your code. Either post a link to your code on a server, or include your code in your message, using the CODE tags (use the '#' icon on the message editor).
I would guess that what you need to do is to set the display of your images. For each image that you wish to display, set the style.display to "block". When you want to display another image, set the style.display of the original image to "none".
What I would do is to include all images within your DIV, with the default style.display of each set to "none". Then, each button would activate one image, setting the display.style to "block". You will need to keep tabs on any previous image, setting its display.style to "none".
An alternative (but less efficient) way would be for each button to set the innerHTML property of the DIV with the desired image.