Text is not inside the div

Asked

Viewed 80 times

0

I am doing float in html, but I had a problem typed a random text and the text did not fit inside the div, which could be, if I type something should not be inside my div ?

<!DOCTYPE html>
<html>
<head>
    <title>Teste</title>
    <meta charset="utf-8">
    <style type="text/css">

        #principal{
            width: 920px;
        }

        .noticia{
            background: #e5e5e5;
            padding: 5px;
            width: 140px;
            margin: 7px;
            float: left;
        }
    </style>
</head>
<body>
    <div id="princiapal">
        <div class="noticia">
            <p>
                iasdhaoidhsoiashdoiashdoiashdoiashdoiashdoisahdoisahdoisahdosadoiasdhoiashdo
            </p>
        </div>

    </div>
</body>

  • 2

    This 'text' is being treated as a word for not having spaces, I think if you use css word-wrap: break-word; must solve

  • Try https://stackoverflow.com/questions/11989546/wrap-a-text-within-only-two-lines-inside-div

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.