PDA

View Full Version : Site Logo/Watermark Script



RGStrat
06-21-2011, 05:53 PM
1) Script Title: Site Logo/Watermark Script

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

3) Describe problem: For some reason, even when I set the offsets to 0, there is still space at the bottom of the image. Does anyone know why? I tried using CSS to make the image have 0 padding, 0 margins and then set the DIV container to do the same.

Any help would be greatly appreciated! :confused:

ddadmin
06-22-2011, 07:55 AM
It should appear flush next to the browser edges in this case. What browser are you using, and does your page contain a valid doctype at the top?

RGStrat
06-22-2011, 01:40 PM
http://img135.imageshack.us/img135/2872/sidelogo.png
This is what it is doing. I am using FF 5 Beta, but it does the same thing in IE8. I'm using the following doctype:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

Does this script not fully support this doctype?

RGStrat
06-27-2011, 09:44 PM
Bumpedy.

ddadmin
06-28-2011, 01:45 AM
Hmm what if instead of setting the offset values to 0, set them to a low negative number, such as:


offsets: {x:-3, y:-3},//offset of logo relative to window corner

Is the result consistent for you in various browsers as far as getting the logo to further hug the lower right edge of the window? If so you can do that instead.

RGStrat
06-29-2011, 02:25 PM
Wow, that works perfectly. I just left the X value at 0 and changed the Y to -6 and it worked. Wierd. Many thanks!

jscheuer1
06-29-2011, 02:52 PM
That might be because of body/html bottom margin/padding. Unless you've explicitly set those, they may vary by browser. A similar effect can also be caused by relatively positioned elements or floats, or possibly other things.

Like if I set the margin to 0 for the body on the demo page, the watermark moves down a few pixels.

If using the negative works in your target browsers, that's fine.

RGStrat
06-29-2011, 09:46 PM
That might be because of body/html bottom margin/padding. Unless you've explicitly set those, they may vary by browser. A similar effect can also be caused by relatively positioned elements or floats, or possibly other things.

Like if I set the margin to 0 for the body on the demo page, the watermark moves down a few pixels.

If using the negative works in your target browsers, that's fine.

Yeah, I'll try playing around with the margin on the body, but for now it's acceptable for me :p