Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Another question on show/hide divs

Posted by: bigginge Mar 22 2012, 09:51 AM

I solved an earlier question I had on this subject but is there anyway I can have the first div http://www.biggingerfish.co.uk/signet/awards.html (2011) showing when the page loads?

Posted by: pandy Mar 22 2012, 11:53 AM

QUOTE(bigginge @ Mar 22 2012, 03:51 PM) *

I solved an earlier question I had on this subject but is there anyway I can have the first div http://www.biggingerfish.co.uk/signet/awards.html (2011) showing when the page loads?



Well, don't hide it to start with I guess. The DW script looks pretty hairy. And it's overkill. There's no need to show and hide when all you want to do is to switch one image to another.

Also, the value of an ID must begin with a letter. Some browsers may ignore you all numeric IDs.
http://htmlhelp.com/reference/html40/attrs.html#id

Posted by: bigginge Mar 22 2012, 01:57 PM

Thank you for the advice on the IDs, I will sort that out.
I found a tut online which explained how to achieve what I did. Could you advise how to do it differently, or point me to a tutorial to explain it? I can see how show hide in Dreamweaver would do it, but I need the images to be in the same place, on top of each other as it were.

Posted by: pandy Mar 22 2012, 04:02 PM

If you place the first image where you want it you can then use JavaScript to change the src of the IMG tag when the links are clicked instead of hiding and showing. I don't know if one method is more effective than the other, but it seems easier this way since it's only equally sized images involved.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)