CSS - Opacity Examples - Neils Resource WebCSS - Opacity Examples - Neils Resource WebOpacity / Rollover - Web Dev. - Neils Resource Web

Contract Menu | Expand Menu

Summary of Content
A few exercises in 'tarting up' my photographs. Hope they may be useful.

Concept from Mandarindesign.com


Add a Shadow to the image by adding a DIV with a defined width and height that is larger than the 500 x 375 image and add the shadow filter code. (See the above forum responses)


Border & Drop Shadow

 

Alvor Harbour at Sunset


Code for the above picture effect:
<div style="width:120px;height:95px;filter:shadow(color:gray)"> (note gray not grey,  they are two diiferent colours!)
<a title="Alvor Harbour" href="images/April2004/Misc0404/misc10.jpg">
<img src="../../TravelWeb/Portugal/images/April2004/Misc0404/misc10_small.jpg" width="100px" height="75px" style="border:3px solid white;"></a></div>

See also the CSS version here


Pullquote

 

...for those who wonder what this is meant to be Its an Example using Div of a Pullquote
An example pullquote

An example pullquote

 An example pullquote

An example pullquote

An example pullquote

An example pullquote

An example pullquote

An example pullquote


An example of a Pullquote using the 'Div' tag.
<DIV style="width:99%;">
<div style="color:#033;width:150px;background:white;filter:alpha(opacity=60);-moz-opacity:.60;opacity:.60;float:right;width:150px;margin-top:10px;margin-bottom:10px;margin-left:10px; font-size:28px;line-height:26px;text-align: right;">
<strong>An example of a pullquote
<strong>An example of a Pullquote</strong>
</DIV>

YOUR TEXT GOES HERE
THIS IS THE TEXT THAT WILL
BE ON THE LEFT SIDE OF THE PULLQUOTE
</div>
<div style="clear:both"></div>
 

Image Rollover with Opacity

Begginers Carp Lake


With CSS all you need to do is put a piece of code in your style sheet to automatically make image or text rollovers. You don't need a second image or scripting. Put the code in the head section of your page between the <HEAD> and the </HEAD>. You only have to do this once.

<style type="text/css">

a.linkopacity img {
filter:alpha(opacity=50);
-moz-opacity: 0.5;
opacity: 0.5;
-khtml-opacity: 0.5;}

a.linkopacity:hover img {
filter:alpha(opacity=100);
-moz-opacity: 1.0;
opacity: 1.0;
-khtml-opacity: 1.0; }

</style>
Then add <a class="linkopacity" to the link when you want to make the rollover. It works with hyperlinked text and images.
<a class="linkopacity" href="hyperlink" title="Begginers Carp Lake" ><img src="images/BeggCarp.jpg" border="0" style="border:1px solid black;" width="32" height="32" alt="Begginers Carp Lake"></a>

Last Update: 04/03/2008 - Html - Opacity Examples - Neils Resource Web

html 4.01 strict css 2.1 javascript 1.2