Forums

Div height background (5 posts)

  1. davey579
    Member
    Posted 2 years ago #

    I have to divs besides eacht other using css:

    .menu_small {
    float: left;
    width: 180px;
    padding: 0 0 0 0;
    }
    
    .menu_small_sec {
    float: right;
    width: 180px;
    }

    But in the left div there is a longer text, so if I give it a backgroundcolor, the backgroundcolor of the right div is 'too short'. I tried to use: overflow:hidden, but that won't work. Suggestions?

  2. shadow
    Moderator
    Posted 2 years ago #

    I would love to give you an easy answer, but there really isn't one.

    However, I would recommend you look at this site as a starting point and work from there.

    http://www.thenoodleincident.com/tutorials/box_lesson/boxes.html

  3. Root
    Member
    Posted 2 years ago #

    There is a very simple answer. You need to use faux columns.
    Just Google it up. Basically you need a bg graphic in the parent container (not the floats).
    Congratulations to shadow on his promo to mod. Greatly deserved and overdue.:)

  4. davey579
    Member
    Posted 2 years ago #

    Never heard about faux columns, but I think it is exactly where i'm looking for. Thanks!

  5. shadow
    Moderator
    Posted 2 years ago #

    Thanks Root. And I must be psychic - somehow I knew you would answer this question more appropriately then I ever could :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.