ketting00 — 2011-10-02T01:25:38-04:00 — #1
Is there any way I can detect if there is a scroll bar on the right of my web page.
However, if the picture has an extra size, the menu looks ugly with a scroll bar on the right. I've tried every method found on Google search but it's not working.
Do you have any idea suggestion.
My keywords search are; window height, window width, scroll bar detection, and many, many more I can remember it all.
Edit: I've used iframe shim as placeholder
paulpov — 2011-12-06T17:53:46-05:00 — #2
I ended up with tweaking Wordpress CSS to solve this. What annoyed me was that the page jumped (shifted) a bit when switching between a long page, that had an automatic scroll, to a short one that didn't show the scroll. To be frank, I didn't find a great solution and decided that the best thing would be having scrollbars on all pages. So I made html and body css height and min-height 101% (100.1% didn't work in Opera). You can see a short page still having a scrollbar here - http://brand-mauer.com/en/portfolio Now I don't have to think about whether there's a scrollbar or not. I know it's always there. Hope this helps.
aussiejohn — 2011-12-06T18:19:08-05:00 — #3
If you set overflow-y:scroll; on the body it should always show a scrollbar (even when there is no scroll needed, it will should show an empty scrollbar).
paulpov — 2011-12-06T18:25:42-05:00 — #4