unwanted scrollbars

1,024 views
Skip to first unread message

Angelica Perduta

unread,
Aug 6, 2013, 1:36:30 AM8/6/13
to chromium-...@chromium.org
The pageAction extension I'm developing has unwanted duplicate scroll bars and I can't work out how to change my HTML to CSS to get rid of them.
You can see a demonstration of the problem here: demonstration on Youtube.
The relevant part of my HTML looks like this:
<div style="max-height:500px; overflow-y:auto">
<table class="makeMenu" style="width:100%"><tbody title="click to toggle troll status" id="trollBody">
<!-- added dynamically, (0 rows is invalid html)  -->
</tbody></table>
</div>
You can get a zip file with the full (prototype) extension from:

Angelica Perduta

unread,
Aug 6, 2013, 11:52:49 PM8/6/13
to chromium-...@chromium.org
Just an update:
If I set max-height to 480 instead of 500 the extra scroll bar is not produced. Thus it looks like there is a built in height restriction on the page action popup!
To get rid of the horizontal scroll bar made overflow-x:hidden. Just lose a single pixel off the border, acceptable but not perfect.
Well it will do for now, but I hope to get more detailed information about making things fit on the screen for any client resolution.

Joe Marini

unread,
Aug 7, 2013, 3:00:43 PM8/7/13
to Angelica Perduta, Chromium-extensions
Extension popups are limited to 800 wide by 600 tall. If you're seeing scroll bars at around 500 there may be some padding on your body element, you can set the padding and margins to 0.



--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/33a5e4af-9e59-4abc-91ce-af6d51110c5b%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/groups/opt_out.
 
 



--
Joe Marini
Developer Advocate / Chrome

Jamie Walch

unread,
Aug 7, 2013, 3:25:50 PM8/7/13
to Joe Marini, Angelica Perduta, Chromium-extensions
This could also be related to https://code.google.com/p/chromium/issues/detail?id=240772, which involves Chrome sometimes adding scroll-bars when they're not needed when the content size changes.


Angelica Perduta

unread,
Aug 8, 2013, 8:19:45 AM8/8/13
to chromium-...@chromium.org, Angelica Perduta
On Thursday, 8 August 2013 07:00:43 UTC+12, Joe Marini wrote:
Extension popups are limited to 800 wide by 600 tall. If you're seeing scroll bars at around 500 there may be some padding on your body element, you can set the padding and margins to 0.

Thank you Joe. That is a very good answer. Indeed, above my 480 pixel high generated menu I have two rows of image buttons  and below it a generated user prompt/status bar and so it probably does add up to 600px. With 20/20 hind sight I do wish the documentation had told me about this and also I'm still clueless how to make sure it is going to work acceptably for users with different screen resolutions.
However now that I know it's not something I was doing wrong, it's time for me to move on and do the Fire Fox version. I am glad I got my first ever extension to more or less do what I wanted and also thanks to the great community here for all the help :o)

Angelica Perduta

unread,
Aug 8, 2013, 8:22:35 AM8/8/13
to chromium-...@chromium.org, Joe Marini, Angelica Perduta

On Thursday, 8 August 2013 07:25:50 UTC+12, Jamie Walch wrote:
This could also be related to https://code.google.com/p/chromium/issues/detail?id=240772, which involves Chrome sometimes adding scroll-bars when they're not needed when the content size changes.

Hey Jamie. That is really useful to know.
In this case it is not applicable because I regenerate the full table every time the page action activates, but I will keep it in mind in future developments.  
Reply all
Reply to author
Forward
0 new messages