Log In · Register

 
Ad Opaqueness with color!, Color!!!
Fireshrieker
post Mar 8 2004, 04:58 PM
Post #1


Feh... I want ramen!!
*****

Group: Member
Posts: 928
Joined: Feb 2004
Member No: 3,203



Instruction: Copy the code and place it into your website stats.

CODE
QUOTE
<script>
function opaque(){
banner = document.body.firstChild.firstChild.getElementsByTagName('table')[0];
if(banner.innerHTML.match('xangalogosmall.gif')){
banner.parentNode.style.width = "0";      //don't change this
banner.style.border = "1px solid #333333"; //border color
banner.style.filter = "alpha(opacity=50)";//Foreground opacity
banner.parentNode.style.background = "#0066c6"; // Your Color
banner.parentNode.style.filter = "alpha(opacity=40)"; //Background Opacity 
}
}
setTimeout("opaque()",1);
setTimeout("opaque()",10);
</script>




Manual: You would change each setting as if you were modifying your css codes.

1. banner.style.border = "1px solid #333333";
This is your settings for the border around the whole banner. If you don't want any border, put transparent inside the quotes.

2. banner.style.filter = "alpha(opacity=50)";
This is the foreground opacity. It makes the things inside the table translucent. 0 would make the banner dissappear, I don't suggest doing that. 100 would give it 100% visible. I suggest keeping this at 50.

3. banner.parentNode.style.background = "#0066c6";
This is the color you want your whole banner to be. Remember, the effect is translucent, which means that it's this color + banner (white)... so the color you want may not be the exact same hex code. It'll be a bit darker than that color.

4. banner.parentNode.style.filter = "alpha(opacity=40)";
This is your background opacity. This will allow the background color and banner to blend. Tweak this setting from 0 to 100. With this one, you can set it to 0 if you like, that is because the whole banner will still be visible at the "foreground opacity". Change the number so that it suits the color of your layout.

NOTE: There are 2 "setTimeout("opaque()",1);", that is not a typo, keep that there. You might find that it works with 1 only, but the second one is a backup.



credit to Kaiyotee
 
 
Start new topic
Replies
Fireshrieker
post Mar 9 2004, 05:29 PM
Post #2


Feh... I want ramen!!
*****

Group: Member
Posts: 928
Joined: Feb 2004
Member No: 3,203



um.

Is it just me, or did Xanga change its script and not allow for these opaqueness scripts to work anymore?

I've tried using both of the opacity scripts on createblog (this one and the original one here) but none of them work.
Can anyone help?
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: