user3290356
user3290356

Reputation: 95

Long text is outside of the div

I've trying to make a test website, but there is a problem.

Here's is a picture, which show you, what's the problem: http://kepfeltoltes.hu/view/140409/734683293asd_www.kepfeltoltes.hu_.jpg

The years (2010,2011,2012) are folders, and the '2013' folder contain some pictures. There's a php function, which I can read the folders and the picture names.

The DOM structure:

Főoldal Elérhetőség Önkéntes munka Képtár Főoldal

        <div id="bottom">
        bhvdksakd
        </div>

The CSS:

#main{
    max-width:22cm;
    min-width:16cm;
    background-color:#fff;
    margin:0px auto 20px auto;
    border-radius:10px;
    padding: 10px 10px 10px 10px;
    min-height:100%;
    position:relative;
    height:auto;
}
#left{
    display:block;
    width:20%;
    min-height:100%;
    position:absolute;
    margin:0px;
    top:0px;
    left:0px;
    border-right:1px solid rgba(192,192,192,0.5);
}
#right{
    display:block;
    min-height:100%;
    height:auto;
    width:80%;
    text-align:justify;
    position:absolute;
    top:0px;
    left:20%;
    padding:20px;
}
#bottom{
    max-width:22cm;
    background-color:#fff;
    margin:0px auto 0px auto;
    border-radius:10px;
}

Is there any css method or anything, that the contain isn't outside of the "right" div?

Thanks!

ps: Sorry for my sentences, but I'm from Hungary :/

Upvotes: 2

Views: 393

Answers (1)

TylerH
TylerH

Reputation: 21098

Add overflow: auto; to your CSS for the div with overflowing content.

This property will automatically add a scroll bar only on necessary axes to help contain content within the boundaries of the div. So if you have too much vertical content, you get a vertical (y) scrollbar. If you have too much horizontal content, you get a horizontal (x) scrollbar.

Upvotes: 4

Related Questions