- Create Account

Calculating "safe" offsets on body {position:relative}

Forums > SuperNote > Calculating "safe" offsets on body {position:relative}
Author
Message

1) squareman Group: Guests
IP: 65.47.--.--
I have a fixed-width layout with:

body { position:relative;  width: 970px; margin: 0 auto; }

The  left-right position is off on the notes triggered both by snp-mouseoffset and if they're too close to the edge of the screen and triggered by snp-triggeroffset.

Removing  position:relative on body fixes it, but unfortunately, this is not an option.

2) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 203.173.--.--
Whoo! That's a funny one :). Might be safer to wrap the page in a DIV and apply your relative centring to that? By default, the script assumes the BODY covers the entire viewport, and since notes are created within the BODY if you move that the notes' calculated position will be incorrect.

- Angus.

Post a Reply:

You are not logged in, and will be posting anonymously as a guest. If you want to post using an account, please login at the top of this page.