bbarakaci / fixto

A jQuery plugin for sticky positioning
MIT License
217 stars 57 forks source link

Calculated width is just a tad short #8

Closed heymoxie closed 9 years ago

heymoxie commented 10 years ago

First: This is awesome. It was easy to implement. It just worked. Thank you so much.

I noticed something about the way width is calculated on fixed elements that could be my fault -- but might also be coming from the calculations. It seems like things are getting shrunk the tiniest of bits.

In the attached image, you can see a sticky nav listing as 1037px -- but the inline styles put it at 1035.6... Which makes it just a minuscule amount narrower than the slideshow below it, which is why there's a hairline of black on the right side.

calculated-width

Many thanks, again.

bbarakaci commented 10 years ago

Thank you.

I checked it a bit on the web page you were working on but couldn't observe the issue with chrome on mac and windows.

I also checked the code to see how the width was calculated. Actually it is nothing fancy, just getting the native computed width.

I am not sure what is going on. I will leave this issue open for some time to see if any other case will pop up. Sorry, couldn't offer much help.