xanga writing over picture or background picture, coding |
xanga writing over picture or background picture, coding |
Jun 16 2006, 03:36 PM
Post
#1
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 63 Joined: Dec 2004 Member No: 74,764 |
is there any way to make text overlap a picture instead of the picture overlapping the text? ...like the text is on top the picture so the picture doesnt cover the text
also is there a way to add more than 1 background image? i want to add like individual pictures in the background that dont cover text |
|
|
|
![]() |
Jun 16 2006, 05:38 PM
Post
#2
|
|
![]() You'll find me in your dreams. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 8,536 Joined: Mar 2005 Member No: 114,010 |
You could add in a id'd div into every entry to have a different background for each.
But, um, yeah. The only way text would be written over an image (which I don't think would be very readable) would be as a background hen overlaying text. Wait - can I see your code for this so I can see what you're talking about? |
|
|
|
Jun 16 2006, 05:54 PM
Post
#3
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 63 Joined: Dec 2004 Member No: 74,764 |
its a code i got from someone else and i configured it a lot :( hope that person wont get mad
it puts an image in the xp and yp position or something but then the image goes over the text i think it has something to do with the parts with document.layer or other document stuffs i doubtfully think that i can put an image under text bu toh well i just want to put images on a spot i want can you give me a code that just puts an image in a certain spot? that would be much easier than doing all of this document.write("<layer name=\"dot"+ i +"\" left=\"20\" top=\"10\" visibility=\"show\"><img src=\"" + falling + "\" border=\"0\"></layer>"); and document.layers["dot"+i].top = yp[i]; //FULL CODE: <script language=JavaScript> /* Falling Picture *1 picture* Original from http://black.demons.to/ fixed to work in XANGA by xanga.com/dorischu */ st=setTimeout; change=''; var no = 10; // number of picture appear var speed = 24; // smaller value will move more faster var falling; var ns4up = (document.layers) ? 1 : 0; var ie4up = (document.all) ? 1 : 0; var dx, xp, yp; var am, stx, sty; var i, doc_width = 300, doc_height = 700; var which; if (ns4up) { doc_width = 300; doc_height = 700; } else if (ie4up) { doc_width = 300; doc_height = 700; } dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); for (i = 0; i < no; ++ i) { which = Math.random() * 4; if ((which>=0)&&(which<1)) { falling = "http://i37.photobucket.com/albums/e66/lunacy104/cc254319.gif"; dx[i] = 0; xp[i] = Math.random()*(doc_width-50); yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); if (ns4up) { if (i == 0) { document.write("<layer name=\"dot"+ i +"\" left=\"20\" top=\"10\" visibility=\"show\"><img src=\"" + falling + "\" border=\"0\"></layer>"); } else { document.write("<layer name=\"dot"+ i +"\" left=\"20\" top=\"10\" visibility=\"show\"><img src=\"" + falling + "\" border=\"0\"></layer>"); } } else if (ie4up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: abso"+change+"lute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 10px; LEFT: 20px;\"><img src=\"" + falling + "\" border=\"0\"></div>"); } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: abso"+change+"lute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 10px; LEFT: 20px;\"><img src=\"" + falling + "\" border=\"0\"></div>"); } } } else if ((which>=1)&&(which<2)) { falling = "http://i37.photobucket.com/albums/e66/lunacy104/738754.gif"; dx[i] = 0; xp[i] = Math.random()*(doc_width-50); yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); if (ns4up) { if (i == 0) { document.write("<layer name=\"dot"+ i +"\" left=\"20\" top=\"10\" visibility=\"show\"><img src=\"" + falling + "\" border=\"0\"></layer>"); } else { document.write("<layer name=\"dot"+ i +"\" left=\"20\" top=\"10\" visibility=\"show\"><img src=\"" + falling + "\" border=\"0\"></layer>"); } } else if (ie4up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: abso"+change+"lute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 10px; LEFT: 20px;\"><img src=\"" + falling + "\" border=\"0\"></div>"); } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: abso"+change+"lute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 10px; LEFT: 20px;\"><img src=\"" + falling + "\" border=\"0\"></div>"); } } } else if ((which>=2)&&(which<3)) { falling = "http://i37.photobucket.com/albums/e66/lunacy104/3157e029.gif"; dx[i] = 0; xp[i] = Math.random()*(doc_width-50); yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); if (ns4up) { if (i == 0) { document.write("<layer name=\"dot"+ i +"\" left=\"20\" top=\"10\" visibility=\"show\"><img src=\"" + falling + "\" border=\"0\"></layer>"); } else { document.write("<layer name=\"dot"+ i +"\" left=\"20\" top=\"10\" visibility=\"show\"><img src=\"" + falling + "\" border=\"0\"></layer>"); } } else if (ie4up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: abso"+change+"lute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 10px; LEFT: 20px;\"><img src=\"" + falling + "\" border=\"0\"></div>"); } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: abso"+change+"lute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 10px; LEFT: 20px;\"><img src=\"" + falling + "\" border=\"0\"></div>"); } } } else { falling = "http://i37.photobucket.com/albums/e66/lunacy104/f37175e3.gif"; dx[i] = 0; xp[i] = Math.random()*(doc_width-50); yp[i] = Math.random()*doc_height; am[i] = Math.random()*20; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); if (ns4up) { if (i == 0) { document.write("<layer name=\"dot"+ i +"\" left=\"20\" top=\"10\" visibility=\"show\"><img src=\"" + falling + "\" border=\"0\"></layer>"); } else { document.write("<layer name=\"dot"+ i +"\" left=\"20\" top=\"10\" visibility=\"show\"><img src=\"" + falling + "\" border=\"0\"></layer>"); } } else if (ie4up) { if (i == 0) { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: abso"+change+"lute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 10px; LEFT: 20px;\"><img src=\"" + falling + "\" border=\"0\"></div>"); } else { document.write("<div id=\"dot"+ i +"\" style=\"POSITION: abso"+change+"lute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 10px; LEFT: 20px;\"><img src=\"" + falling + "\" border=\"0\"></div>"); } } } } function snowNS() { for (i = 0; i < no; ++ i) { yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = 300; doc_height = 700; } dx[i] += stx[i]; document.layers["dot"+i].top = yp[i]; document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]); } st("snowNS()", speed); } function snowIE() { for (i = 0; i < no; ++ i) { yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7+ Math.random(); doc_width = 300; doc_height = 700; //You May change to 1550 or bigger number to let the image fall until down } dx[i] += stx[i]; document.all["dot"+i].style.pixelTop = yp[i]; document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]); } st("snowIE()", speed); } if (ns4up) { snowNS(); } else if (ie4up) { snowIE(); } </script> |
|
|
|
Jun 16 2006, 05:58 PM
Post
#4
|
|
![]() You'll find me in your dreams. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 8,536 Joined: Mar 2005 Member No: 114,010 |
Ugh, god. I hate codes like that.
You could configure it differently, but that requires too much work. It's easier to just not use it. Or make and animated .gif to use as your background (which might be too much work too). |
|
|
|
Jun 16 2006, 06:03 PM
Post
#5
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 63 Joined: Dec 2004 Member No: 74,764 |
it was originally the "falling images" code...
i just put it in my xanga and saw that the images werent falling and stayed in place which gave me an idea to put images on my xanga but then i didnt want to put them in random places so i started thinking and changed the positioning and stuffs and then yeah that was my whole day -_- |
|
|
|
Jun 16 2006, 06:17 PM
Post
#6
|
|
![]() You'll find me in your dreams. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 8,536 Joined: Mar 2005 Member No: 114,010 |
Yeah, I realize that. You didn't bother to take the credits header out. If you were determined to keep it, you'd need to contain everything (but that code) in a.... Actually, just stick this under that code (wait, where did you put it?):
CODE <div style="z-index: 100;">
|
|
|
|
Jun 16 2006, 06:20 PM
Post
#7
|
|
|
Senior Member ![]() ![]() ![]() Group: Member Posts: 63 Joined: Dec 2004 Member No: 74,764 |
blehhh too much work TT-TT isnt there just a code to put an image in a certain spot?
|
|
|
|
![]() ![]() |