Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Overflow – dynamic declaring possible?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #25056
    RottNKorpse
    Member

    I really have no idea what to call my question but here is exactly what I am wanting to do.

    I have my own forum running on phpbb3 and I have set rules for signatures for users like your signature can’t be over 500 pixels in height. Now I know there will always be someone who either doesn’t read the rules or simply doesn’t care so I was wondering if there was a way to dynamically declare an overflow css depending on the size of the signature of a user.

    Example:
    User A:
    signature contains a single image that is only 300 x 100…so I would want the size of the signature box to fit the image.

    User B:
    signature contains two images each 400 x 300 totaling the signature size to be 400 x 600…here I want the overflow to be declared so it creates scrollable signature for that user.

    So basically I want the overflow to only activate if a user has 500px worth of content, text or images, but if they dont to just display the content normally.

    What I tried:

    Code:
    width:100%;
    height:500px;
    overflow:auto;

    This works essentially but the problem is that it resizes the signature field on EVERYONE’s signature including User A who wasn’t using 500px to suddenly be 500px regardless the content.



    Hopefully I was clear enough…can anyone help me out with this?

    #58661
    AshtonSanders
    Participant
    "RottNKorpse" wrote:
    I have set rules for signatures for users like your signature can’t be over 500 pixels in height.

    Haha you must really be fond of scrolling. lol

    "RottNKorpse" wrote:
    Hopefully I was clear enough…can anyone help me out with this?

    Yea, your (theoretical) solution lies in "max-height."

    Code:
    max-height: 500px

    It’s the theoretical solution because it doesn’t work in IE6…

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.