-
Website
http://www.naterkane.com/blog/ -
Original page
http://www.naterkane.com/blog/2007/03/26/bgsleight/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
adsl viettel
1 comment · 0 points
-
WaltRibeiro
1 comment · 2 points
-
joshklein
1 comment · 1 points
-
spencerb
1 comment · 1 points
-
Steven Ray
2 comments · 6 points
-
-
Popular Threads
i have a png on my page but it doesn't appear at the bottom when using the code in your copy of bgsleight
I can't figure out what to do with isbottom in order to make the image appear at the bottom if its meant to
the function that i put together to fix the bottom positioned bg images is this.
[js]
function fixBoxes(){
var boxes = document.getElementsByClassName("box-wrapper");
for (var i = 0; i < boxes.length; i++){
var boxBottom = document.createElement("div");
var src = boxes[i].currentStyle.backgroundImage.substring(5,boxes[i].currentStyle.backgroundImage.length - 2);
boxBottom.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
boxBottom.className = "box-bottom";
boxes[i].style.backgroundImage = "none";
boxes[i].appendChild(boxBottom);
}
fnLoadPngs(); // now let's fix the pngs.
}
[/js]
and it's called like so..
[js]
//...
return {
init: function() {
if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
if (document.getElementsByClassName("box-wrapper")){ // check to see if we have any 'boxes' on the page
addLoadEvent(fixBoxes);
} else {
addLoadEvent(fnLoadPngs);
}
}
}
}
}();
bgsleight.init();
[/js]
http://www.pinstripepresentations.com/index.php
Any help would be appreciated if you can spare the time. thank you very much.
I was using an old version of sleight+sleightbg, but I have a big problem with png background in DIV (the picture is scaled, so your script seems to be the solution, but, what are these pictures : "x.gif and "../images/blank.gif" ?
Thans a lot
I'm eager to try out your png fix - i'm not a coder, so bear with me: the link back to the instructions on Youngpup’s site doesn't work - he seems to have removed the archived post? so now there doesn't seem to be any instructions?
i've linked the .js file to my page, placed an x.gif in the root, and added a "blank.gif" in root as you've noted. (and in both cases corrected the urls in the js file to match.
no luck!
any thoughts?
thanks,
paul
Thanks!
wedding.kedinger.com
Thanks,
Daniel Kedinger
In regards to Daniel Kedinger's comment, wondering how to fix the unclickable links, try putting position:relative on the links that are unclickable, and it should work.
Thanks Nater!
I’m sorry for little off-topic, but I want to ask you about design of this site.
Did you make this template yourself or got from any templates website?
Looks pretty cool for me. Wonderful well this reading.
I use the superslight all the time but am sick of the limitations to be honest.
The object that the filter is applied to must have layout before the filter effect will display. You can give the object layout by setting the height or width property, setting the position property to absolute, setting the writingMode property to tb-rl, or setting the contentEditable property to true.
Take from: http://msdn.microsoft.com/en-us/library/ms53296...
as i have tried your code, place transparent.gif file but it didnt work.
please reply me on my mail-id so i can show you my code also.