Styling Lists / Colors / Images / Setting Image Opacity
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
Creating transparent images like I have here with CSS is easy. You can see that the image to the right is much more transparent; less opaque than the image to the left. So in this movie I'll show you how to create transparent images like this with CSS. If we look at the code for these two images, notice that the image to the left, the image source looks like this. I have an alt tag, height, width. The image on the right is this tag. Notice I have some additional properties such as style, opacity colon .2. Also I have another property here, filter alpha opacity equals 40. Firefox uses this style equals opacity property for transparency while Internet Explorer uses this property; filter colon alpha and then in parentheses opacity equals 40. Let's go ahead and change this to ten for the Internet Explorer call and let's change this to .1 for the Firefox call. Let's save this document and let's refresh this in the browser and have a look at the changes and notice that the opacity now has been turned down further on the image to the right. In Firefox the opacity value can be anything from .0 to 1.0. A lower value makes the element more transparent. In Internet Explorer the filter.alpha opacity can be a value from zero to 100. A lower value here makes the element more transparent. Let's go ahead and preview this in Internet Explorer to show you that it does work. Now, when you first open up the page you'll get this error or you may get this error. To help protect your security, Internet Explorer has restricted this web page from running scripts or ActiveX controls. What I'm trying to run here is an ActiveX control to control the opacity. Click here for options. If you go ahead and allow the blocked content, you'll get this error message. You're allowing active content such as script and ActiveX controls can be useful but active content might also harm your computer. Are you sure you want to let this file run active content? Go ahead and click Yes and then notice the image is indeed more transparent here.
Tutorial Information
| Course: | HTML 4/5 with CSS |
| Author: | James Gonzalez |
| SKU: | 34077 |
| ISBN: | 1-935320-93-9 |
| Release Date: | 2009-12-31 |
| Duration: | 10.5 hrs / 142 lessons |
| Work Files: |
Yes |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 