Forum Moderators: open
having some problems with divs and BR tags going walkies..
i have a form split into afew blocks. each block is encapsulated with a div. on selecting a dropdown , certain divs will dissapear, using the display = none.
each block is separated with a single <br> tag, which is fine.. until i pick one of these dropdowns to make the bits dissapear, then a br tag does a runner, and the blocks squish together..
all the blocks and divs are all done the same way , yet only one of the <br>'s stops working.
i have also substituted the <br> for some text, which also dissapears, although if i grab a selection across the page, it has the text in the clipboard..
most confusing
the html..
<div id='blah'>
dropdowns...
<div id='blah2'>
stuff in this div will do a display = none in certain circumstances.
</div>
</div>
<br> <!-- <<<--- this is the tag that is going walkies -->
<div id='ret_blah'>
dropdowns..
<div id='ret_blah2'>
as above will dissapear sometimes..
</div>
</div>
and the js
id = blah2; <!--for instance...-->
if (some test){
divs = document.getElementsByTagName("div");
divs[id].style.display = 'none';
}
ive given the divs a border to see if i can make more sense of it, but it all seems to be fine.
cant give the divs a bottom margin, as it wont work in NN4.. :o
any other ideas..?
the most strange thing is that there are 4 of these div 'blocks' on the page, and its only doing it on one of them..
arrrggghghhghgh
this is sposed to be fun.. :(