| |||||||||||||||||||||||||||||
|
David McRitchie wrote: > "Tony Mechelynck" <antoine.mechelynck> wrote in message news:RaqdnRf51OaLiOPbnZ2dnUVZ_s7inZ2d... >> Peter Potamus the Purple Hippo wrote: >>> Tony Mechelynck wrote: >>>> I've seen a few weeks ago a CSS rule to add scrollbars to context >>>> menus but I can't find it back: >>>> >>>> - userChrome.css or userContent.css? (userChrome is my guess) >>>> - which selector (i.e., to which element, class or ID must it be >>>> applied)? >>>> >>>> The rule itself was { overflow: auto !important } >>>> >>>> >>>> Best regards, >>>> Tony. >>> try this in the userchrome. >>> >>> NOTE: Userchrome is for changing the way the program looks, while >>> content is the way you see web pages. >>> >>> @namespace >>> url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); >>> >>> menupopup { >>> max-height: 300px; /* or any height you want */ >>> } >>> >>> menupopup autorepeatbutton { >>> display: none; >>> } >>> >>> menupopup scrollbox { >>> overflow-y: auto; >>> } >>> >> Ok, I'll try it next time I restart Firefox. (Nir's suggestion didn't work.) >> That'll probably be tonight or tomorrow, since today (Sunday) I'm going to a >> family reunion in the Netherlands. > > The suggestions are the same, except the namespace at the top. > If you are using Windows then I've not heard of anyone that needs that. > > I not using Windows you probably need it, There would only be one > and it would be at the top. > > Copy everything the syntax is very > important so if you are missing a closing brace you lose out from > that point down. I used a height of 600px it will expand beyond > the window, if it you chose something a lot higher it would shrink > to fit the screen. In other words not much point in limiting the > height to less than half the screen height if you already have a problem > and need scrollbars. At a screen resolution of 1024x768 a height of 600px > works well for me. > > If you still have a problem, and you have a theme installed, > try disabling the theme to see if it makes a difference. I don't > think it would make a difference but would be something to try. > My userChrome.css already had the @namespace line, about which userChrome-example.css warns, with no explanation, that it is "required for correct operation". I don't know why it is needed (maybe to avoid giving chrome privileges to possibly-malicious code?) but I have seen no convincing arguments about why it would not be needed, so for lack of a good reason not to, I follow the advice of the Mozilla people. Yeah, I forgot to copy the word "scrollbox" from Nir's example (!). The snippet below did the job (maybe it's overkill, I don't know, but anyway it works); strangely enough, { overflow: auto !important } (without -y) does _not_ work. See https://bugzilla.mozilla.org/show_bug.cgi?id=373078 for a description of my problem: sometimes the menu scrolling arrows unexpectedly fail to appear, in Fx2 or Fx3 but not in Fx1.5. Heavy load conditions seem to be an aggravating circumstance, and context menu arrows are either present or absent for each run of Firefox (restarting sometimes makes the problem go away... or come back), which makes me suspect a race condition at some point of startup. I didn't set a maximum height, so I get the full height of the screen for a "menu bar" menu, and from the mouse pointer to the top or bottom edge of the screen (whichever is farther) for a context menu. My usual theme is GreyModern but the "Firefox default" theme gives me the same problem. (You may be unaware of it, but it is not possible to run Firefox with "no theme". If you never installed any theme since the day you first installed Firefox, you get what is appropriately called the default theme.) /* * give the menus a scrollbar when they are too high to be * displayed in full */ menupopup scrollbox, #contentAreaContextMenu scrollbox { overflow-y: auto !important } /* * uncomment the following to * eliminate scroll buttons at top and bottom of the menus * menupopup autorepeatbutton, #contentAreaContextMenu autorepeatbutton { display: none !important } */ Best regards, Tony. -- The meta-Turing test counts a thing as intelligent if it seeks to devise and apply Turing tests to objects of its own creation. -- Lew Mammel, Jr. _______________________________________________ support-firefox mailing list support-firefox https://lists.mozilla.org/listinfo/support-firefox To unsubscribe, send an email to support-firefox-request?subject=unsubscribe
| ||||||||||||||||||||||||||||
© 2004-2008 readlist.com