?
Solved

Hidden and Visible DIVs

Posted on 2000-03-01
5
Medium Priority
?
363 Views
Last Modified: 2013-12-25
I have an unorder list of items that are hyperlinks.  I also want to have a DIV on the same line as the list item, just to the right of it.  This DIV should be invisible when the page is loaded.
When a person moves over the link I want to corresponding DIV to become visible and when they move off the link the div should be invisible again.

Just for an example create a list with the following items; Sleep, Disease, Blindness and each of the corresponding DIV should be contain the words Caused By.
0
Comment
Question by:cavacasp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 9

Expert Comment

by:TTom
ID: 2574561
Try this out.  It will work in IE, but you will have to play with it to get it functional in NS.

<html>
<head>
<title>Tom's Test Page</title>
<script language=JavaScript>
<!-- Hide from older browsers

//-->
</script>
</head>
<body>
<!-- Remember to save this page with another name -->
<hr>
<div name=div1 id=div1 onmouseover="div2.style.visibility='visible'"

onmouseout="div2.style.visibility='hidden'">Sleep <span name=div2 id=div2

style='hidden'>caused by</span></div>
</body></HTML>

Tom
0
 
LVL 1

Expert Comment

by:MikeyG
ID: 2578341
Even better, use:

<div name=div1 id=div1 onmouseover="div2.style.display='block'"

onmouseout="div2.style.display='none'">Sleep <span name=div2 id=div2

style='display:none'>caused by</span></div>

Because the display property determines whether the div is actually rendered, and any text/tags underneath the div will get shifted up.  But then again, I'm not sure how compatible this is with NS...
0
 
LVL 9

Expert Comment

by:TTom
ID: 2580152
More info.

The "display" property (probably because it does not render the div) makes the span display below the first (as opposed to alongside it).

Niether of these bits works in NS, but I THINK, NS supports different properties for "visibility", i.e. M$ = "visible"; NS = "show", or something like that.

There are also going to be problems with whether or not NS supports the visibility property of a <DIV> or <SPAN>.

In any case, here is a link to the NS documentation on working with "positioned" blocks of text, etc.

http://developer.netscape.com:80/docs/technote/dynhtml/css/css.htm

FWIW, the NS developer site definitely has some more info on this stuff.  Go and search the site for "visibility".

HTH,

Tom
0
 

Author Comment

by:cavacasp
ID: 2592542
TTom submit as an answer.  That works just like I need it to, expect of course you had one small mistake in this line
style='hidden'
where it should have been
style='visibility:hidden'

0
 
LVL 9

Accepted Solution

by:
TTom earned 450 total points
ID: 2592721
cavacasp:

Happy to be of assistance.

Tom
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question