scrolling pic

Sunday, 13 September 2009 10:44 pm
miriam_e: from my drawing MoonGirl (Default)
[personal profile] miriam_e
Yay! I did it. The RandomWalks cartoons should no longer screw up peoples' friends pages because I've worked out how to make them scroll inside the page. The trick is to surround the image tag with div tags like this:
<div style="overflow: scroll"><img src="some_image" width="pixels" height="pixels"></div>
This puts scrollbars below and to the right of the picture so that if it doesn't fit in the page, instead of widening the table the picture accommodates the page.

Cool huh?

Took me a lot of detective work to figure this out. Couldn't find it documented anywhere.

Date: 2009-09-13 10:22 pm (UTC)
From: [identity profile] miriam-e.livejournal.com
Odd... Are you sure there aren't any other pictures or code sections that are widening your LJ flist out beyond the window?
I tried this out on small windows and it works fine on mine.

I'm using Mozilla Seamonkey, which should function identically to Mozilla Firefox.

I draw the cartoon in 3000x1000 then reduce it to 1000x333 losing detail in the process. I'm somewhat reluctant to reduce it still further, though if push comes to shove I'll go down about 10% further without losing too much. (Yes, I'm being a little precious about my crummy artwork, but that's what we artists do :)

Profile

miriam_e: from my drawing MoonGirl (Default)
miriam_e

February 2026

S M T W T F S
123 4 567
891011121314
15161718192021
22232425262728

Style Credit

Expand Cut Tags

No cut tags
Page generated Sunday, 8 February 2026 03:47 pm
Powered by Dreamwidth Studios