Click to See Complete Forum and Search --> : how to hide the DIV border?
barry lewin
06-16-2003, 01:14 PM
I'm using DIV sections to hide/display certain sections of my form based on an input box.....the code is working ok but when the DIV section displays there is a border around it that looks lousy on the form. I've tried using "border=0" and stuff like that but it still shows..
does anyone know how to hide the border?
thanks
barry
Do you mean style="border:0;" in CSS? Or is there some Javascript code that automatically adds a border? If so, please post the code.
Jona
barry lewin
06-16-2003, 01:41 PM
the html is:
<DIV ID="SemesterID" CLASS=noDisplay border=0 ><FIELDSET>......fields in here....
</fieldset></DIV>
then in javascript i do:
if (f.Option[2].checked ==true)
{
document.all.SemesterID.style.display = "block";
}else{
document.all.SemesterID.style.display = "none";
}
when it displays there is a thin border around the div fields which is the width of the form..
thanks for your help
barry
Have you tried the suggestion I posted above?
Originally posted by me (Jona)
Do you mean style="border:0;" in CSS?
Jona
barry lewin
06-16-2003, 02:30 PM
I did try your suggestion changing my style sheet to:
.noDisplay {display:none;border:0}
.display {display:block;border:0}
with no change to the output....a thin border around the entire DIV
thanks
barry
Are you sure that you aren't mistaking the border of the FIELDSET element for the border of the DIV? FIELDSET automatically creates a border (which is what it's for, basically).
Jona
khaki
06-16-2003, 02:33 PM
hi Barry....
try putting semi-colons at the end of your style
.noDisplay {display:none;border:0;}
.display {display:block;border:0;}
that should make a difference.
;) k
EDIT:
actually it doesn't make a difference (i thought that it did)....
but it's a good habit to practice regardless.
I'll go back to sleep now ;)
I should NEVER answer ANY questions in this forum :rolleyes: