Graphic Design shadow to enhance presentation of images.
Graphic Design shadow to enhance presentation of images.

Web Design - Tips, Tricks and Programmng

Hiding a Picture using CSS

Return to Forum Home Page

Forum

Return to Topic

Return to Topic

Login to Forum

Login to Forum

Register to access Forum

Register to access Forum

Previous Thread Return to Topic Next Thread
Author Message

Norm Jurgen

Norm Jurgen

Date Joined:
Jan 19, 2010

Posts:
56

Posted: Thu Apr 8, 2010 04:40 PM

Subject: Hiding a Picture using CSS

This is a relatively simple post but it is of HUGE benefit to any programmer wanting to load images onto a page without the use of a Javascript pre-loader. An example of this might be a rollover button.

Create an image that you wish to hide and only appear under certain circumstances.

Define a CSS tag either as part of your HTML <head> section or in an external .CSS file.

.hiddenPic {display:none;}

Now, within your HTML <body> ensure your hidden image uses this tag.

<img src="images/common/rollover.jpg>" alt="Return to Home Page button" border="0" class="hiddenPic" />

Viola!

Return to Forum Home Page

Forum

Return to Topic

Return to Topic

Login to Forum

Login to Forum

Register to access Forum

Register to access Forum