View Full Version : overlapping layers

06-10-2004, 08:47 PM
I have code that makes some text visible when clicking on a link:

.b { color: blue; visibility: hidden; }

function dothis(letter){
document.getElementById(letter).style.visibility = "visible";

<span id="a" class="b">this is a</span>
<span id="c" class="b">this is c</span>
<a href="javascript:dothis('a')">see changes a</a>
<a href="javascript:dothis('c')">see changes c</a>

Problem is, when you click on 'c', the line "this is c" does not start from the edge of the page. how do I fix that? Thanks.

Mr J
06-10-2004, 09:01 PM
Try using DIVs

<div id="a" class="b">this is a</div>
<div id="c" class="b">this is c</div>

06-10-2004, 09:22 PM
This makes 'c' begin on a new line. thanks.