Previous Message
Next Message

Best Way to Show/Hide Text

Sent by Jon Wynacht on 14 March 2006 17:05


I'm wondering if there is a definitive way to show/hide text using  
JavaScript and CSS. I'm working on a project which involves a map  
with various states that are linked. When a state is clicked content  
appears which is relevant to that state. Click another state, the old  
content is hidden and the new content appears.

You can see what I've come up with here:

Obviously this doesn't work so well as the positioning is not  
correct. I'm using the same CSS for each <div/> of content:

	background-color: #FFFFFF;
	width: 480px;
	position: absolute;
	top: 515px;
	left: 378px;
	visibility: hidden;
	z-index: 100;
	padding: 10px;

I'm then using JavaScript to show/hide the layers.

Any suggestions to obtain cross-browser positioning bliss? I've seen  
some sites via Google but nothing that does this necessarily.

Help and hazings always appreciated.



Jon Wynacht

css-discuss [EMAIL-REMOVED]]
IE7b2 testing hub --
List wiki/FAQ --
Supported by --
Previous Message
Next Message

Message thread: