...

View Full Version : overlapping layers



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

<style>
.b { color: blue; visibility: hidden; }
</style>

<script>
function dothis(letter){
document.getElementById(letter).style.visibility = "visible";
}
</script>


<span id="a" class="b">this is a</span>
<span id="c" class="b">this is c</span>
<P>
<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>

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum