Iulia Linnea (iulia_linnea) wrote,
Iulia Linnea

TIL: LJ has a CSS-enforced height restriction of 2048 pixels on images

Artists! I just learned that LJ uses CSS to restrict an image's height to 2048 pixels (which means that in some browsers, long art comes over all squished), so if you're working with long images, you'll have to set the max height in pixels in the image tag. Tonight, I discovered this issue with regard to hikorichan's excellent comic, Pygmy Puffs (G)—I really wish that someone had mentioned it to me during the fest—and after trying various things, this is how I corrected the problem:

<center><img src="http://ic.pics.livejournal.com/sshg_pf_mod/56313174/21678/21678_original.png" alt="Pygmy Puffs (G)" style="max-height: 3475px;" width="600" height="3475" border="0" /></center></lj-cut>

See that bolded style attribute? That's what one must set to the desired height in pixels in order to override LJ's CSS. LJ has a lot of these annoying style-related issues (I thought I knew them all), and I completely missed this one because no one's ever submitted an image this long and Firefox, my default browser, ignores LJ's CSS directive.

Thank goodness the comic is now properly displaying! *\o/*
Tags: *admin, css, formatting, livejournal, modding, sshg_promptfest

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.