3 ms·
I added the padding and now the scrollbar appears in my browser for one line examples. I think I actually like it best with cropping instead of the scrollbar
by pg 19y ago
I added the padding and now the scrollbar appears in my browser for one line examples.
I think I actually like it best with cropping instead of the scrollbar. The curious can still get at the text by widening the browser or copying and pasting. Is there any way to get just cropping?
- gojomo 19y agoCSS property overflow:hidden ...should just crop. If the transition text-jump isn't too annoying, this might also be interesting: pre {overflow:hidden; padding:2px} pre:hover {overflow:auto} PRE blocks would be clipped until mouseover, when a scrollbar would appear if necessary (bumping following text down).
- pg 19y agoI just added your solution (handy to have a repl in the server) and it works well. Thanks very much; this had been bugging me for a long time.
- ingenium 19y agoIt works fine in Opera, but it still makes the whole window scroll on the newest nightly build of Firefox 3 like before the patch was applied. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2007122605 Minefield/3.0b3pre