PDA

View Full Version : Site Logo/ Watermark



sdzeltwanger
02-08-2010, 04:52 PM
1) Script Title: Site Logo/ Watermark

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/logo.htm

3) Describe problem: I'm not having a problem with the script, and I figure it has to be possible, but instead of having the watermark positioned in the corner, I would like it centered on the bottom of the page. Does anybody have and idea how to pull it off, as I have no idea where that's located in the script?

ddadmin
02-09-2010, 02:12 AM
Try finding the below line inside the .js file:


var x=$window.scrollLeft() + (is1or3? this.offsets.x : $window.width()-this.$control.width()-this.offsets.x)

and change that to:


var x=$window.scrollLeft() + $window.width()/2-this.$control.width()/2

sdzeltwanger
02-09-2010, 04:48 AM
I tried your suggestion and I can't see that it made a difference. If you want to look at my code it is at http://www.jobs4teens.us/PRCA/index.php. I really like the feel of it, but I would like the bottom image centered.

ddadmin
02-09-2010, 08:24 AM
Ah yes, there is an additional change you also need to make. Find the below line:


.css(mainobj.coord)

and change that to:


.css(mainobj.coord, left:mainobj.offsets.x + $window.width()/2-mainobj.$control.width()/2)

Untested, but that should do it.

sdzeltwanger
02-09-2010, 02:48 PM
I changed it and Dreamweaver told me there was a syntax error in that line, and when I tried to refresh the page, the script didn't launch. I hate to be a pest, but Java is not my strong point when it comes to web design, so I have no idea.

ddadmin
02-10-2010, 09:54 AM
Ok, try the below attached .js file. It incorporates the changes above and fixes an issue with it.

sdzeltwanger
02-10-2010, 03:01 PM
ok, I uploaded your file, changed the image to what I want down there, but the problem now is that the left side of the image is in the center of the bottom, not the center of the image. If you want to see what I mean, http://www.jobs4teens.us/PRCA/index.php

ddadmin
02-11-2010, 07:26 AM
Inside the .js file, try giving the image explicit width/height attributes when defining it:


logoHTML: '<img src="/PRCA/images/meadow.png" style="border:0;width:400px;height:150px" />', //HTML for logo, which is auto wrapped in DIV w/ ID="mysitelogo"

sdzeltwanger
02-11-2010, 04:00 PM
Now I feel kind of dumb. Now it works great, thanks.

sdzeltwanger
02-18-2010, 03:05 AM
I hate to ask for help again; but I just looked at my page in IE and learned about the transparent .png glitch and was wondering if there was any way to use the AlphaImageLoader with this script.