Computing.Net > Forums > Web Development > html elements visible and not

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

html elements visible and not

Reply to Message Icon

Name: liliyaw
Date: July 5, 2006 at 14:04:11 Pacific
OS: linux
CPU/Ram: 524
Product: don't know
Comment:

Can anyone tell me if there is a way to mask/unmask or set visible/not elements in a web page like select options and input text?
Thanks in advance.



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: July 5, 2006 at 14:23:44 Pacific
Reply:

Use the "display" style property.

Inline you would use it like this: style="display:none;"

However since I am assuming you want this to be dynamic, you would need to do it in JavaScript like this:

element.style.display = "none";

or

element.style.display = "block";

There are many more values that you can use for that property as well. Here is more info on the display property: http://www.w3schools.com/css/pr_class_display.asp

Just be carefull that you test in various browsers as some browsers handle differnt values differently.

Michael J


0

Response Number 2
Name: smbotans
Date: July 5, 2006 at 20:13:37 Pacific
Reply:

be very careful about 'hiding' text on a page as search engine spiders may not like it penalize your site's ranking

serge

SEO Resources

Meta Keywords Advice


0

Response Number 3
Name: liliyaw
Date: July 19, 2006 at 13:30:32 Pacific
Reply:

Thanks a lot! I got it...


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


dirty server data in IE &... Search engine for CMS??



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: html elements visible and not

Javascript, div, visibility, and IE www.computing.net/answers/webdevel/javascript-div-visibility-and-ie/3286.html

site works in IE but not FireFox www.computing.net/answers/webdevel/site-works-in-ie-but-not-firefox/2716.html

Nifty HTML Guide www.computing.net/answers/webdevel/nifty-html-guide/590.html