[nodebb-plugin-shoutbox] Shoutbox plugin
-
You can use a CSS3 feature called
vh
. It's supported in pretty much everything except Opera Mini & Android Browser at the minute.Put this in your custom CSS:
#shoutbox-content, #shoutbox-archive-content { height: 70vh; overflow-y: scroll; }
Adjust the 70vh until you're happy with it's positioning. It will look the same on all screen sizes. vh is a % of the view height. Which is the height of the users browser.
For me, using
50vh
removes the scrollbar on the page, and makes it full height including the "who's online" underneath. -
+1
works like charm. thank you so much. @a_5mith
-
@humanmadeaccount said:
+1
works like charm. thank you so much. @a_5mith
No problem, there's a few issues outstanding on things like iOS7 or IE9, you can read about them here
-
Thanks @Schamper that fixed it, but now
user Gravatars are too big in the shoutbox http://tilg.in/2410_05_12.png
on page refresh, scrollbar goes to top (not the latest post) http://tilg.in/2410_25_11.png
-
http://stackoverflow.com/questions/280049/javascript-callback-for-knowing-when-an-image-is-loaded could be of some use to you.
The .complete callback looks like what I'd try for your situation.
-
@Schamper It's definitely going to add some client-side load. I think you might be able to put the check on each image and then put it on a toggled timer to re-fire the scroll, so you don't end up re-scrolling the shoutbox 20 times. I can't really think of another way to accomplish it.
-
Glad to hear that.
Could you post an annoucement when you plublish? Thanks.