/    Sign up×
Community /Pin to ProfileBookmark

how to hide the DIV border?

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

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@JonaJun 16.2003 — [font=arial][color=maroon]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.[/color][/font]

[b]Jona[/b]
Copy linkTweet thisAlerts:
@barry_lewinauthorJun 16.2003 — 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
Copy linkTweet thisAlerts:
@JonaJun 16.2003 — [font=arial][color=maroon]Have you tried the suggestion I posted above?[/color][/font]

[i]Originally posted by me (Jona)[/i]

[b][font=arial][color=maroon]Do you mean style="border:0;" in CSS?[/color][/font][/b][/quote]


[b]Jona[/b]
Copy linkTweet thisAlerts:
@barry_lewinauthorJun 16.2003 — 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
Copy linkTweet thisAlerts:
@JonaJun 16.2003 — [font=arial][color=maroon]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).[/color][/font]

[b]Jona[/b]
Copy linkTweet thisAlerts:
@khakiJun 16.2003 — 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

[I]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:

[/I]
×

Success!

Help @barry_lewin spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...