Setting transparency on a myspace layout.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4 out of 5)
Loading ... Loading ...

Need help understanding how transparency is done?

This lesson assumes that you already have a CSS layout for your myspace
page and need to change the transparency of a section. This lesson also assumes that you have at least introductory experience with Cascading Style Sheets

Transparency is a popular way to decorate a page, both in myspace and with other popular services. It is fairly easy to do as long as you keep a few details in mind :

  1. Know what the code is!
  2. Know exactly what you want to make transparent
  3. Know how transparent you want to make it
  4. Remember to set code for both internet explorer and mozilla type browsers

1 - Know what the code is

There are 4 lines to this. The first is the placement. You have to set a placement for this transparency / opacity change to work.

We used float:left; This works for IE and Mozilla / Firefox.

Because you want your code to work on multiple browsers - use all 3 versions of this code

float:left;

filter:alpha(opacity=80);

-moz-opacity:.80;

opacity:.80;

You can tweak those numbers to get different effects. Just note that opacity =100 means it’s opaque.

2 - Knowing what to make transparent

This code goes within the { } for your CSS definition. You most likely won’t want to make your entire layout transparent - although there are some cases where this might be appealing. For example :

To make a specific table content transparent place your code within the CSS definition for those tables.

eg for your myspace tables

table table table {

float:left;

filter:alpha(opacity=80);

-moz-opacity:.80;

opacity:.80;

}

3 - Know how transparent to make this

This is entirely subjective. You simply need to tinker with the numbers to figure out how transparent to make it. Just remember that # opacity = 100 - opacity transparency. Therefore 30 % opacity = 70 % transparent

4 - Remember to set code for both internet explorer and mozilla type browsers

The code listed above covers both IE and Mozilla Firefox. It is somewhat redundant but it is worth keeping.

Here’s an example of a table which has been set to be at 50 % opacity. Do not forget to assign the class to your element or this won’t work!

css code:

<style type=”text/css”>

.testtable {

float:left;

filter:alpha(opacity=50);

-moz-opacity:.50;

opacity:.50;

}

</style>

HTML CODE :

<table width=”50%” border=”0″ class=”testtable”>

<tr>

<td><strong>This is the text in this table </strong></td>

</tr>

<tr>

<td><img src=”/images/scrollingimage.jpg” width=”466″ height=”206″></td>

</tr>

<tr>

<td>This is at 50 % opacity </td>

</tr>

</table>

We hope you will find this useful. This is another example of how versatile CSS can be for designing your page layouts.
Share and Enjoy in your Social Bookmarks: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Technorati
  • StumbleUpon
  • De.lirio.us
  • Shadows
  • Slashdot
  • SphereIt
  • YahooMyWeb
Your Ad Here

No Comments

Leave a reply

You must be logged in to post a comment.

You must be a registered member and log in on our forums to post comments or requests on any post. Your forum login can be used on this form. Registration is fast and easy and being a member also lets you become a member of our community of users! Registered Members can :
- Create profile pages
- Request custom sigs, layouts, templates, and more
- Advertise their profiles and personal sites in their comments
- Meet other members who use our services
and so much more...