text in div not going to next line

Posted by Kia Dull on Stack Overflow See other posts from Stack Overflow or by Kia Dull
Published on 2012-10-29T04:42:39Z Indexed on 2012/10/29 5:00 UTC
Read the original article Hit count: 140

Filed under:
|
|
|

for some reason the text in my div doesn't go to the next line, i've tried several different css elements which don't seem to work.... word-wrap:break word, just jumbles the letters...

what i want is for one there is an extra word it goes down to the next line like it's supposed to

here is my code

this is the div it's in

    #top7 {
        width: 150px;
        height:auto;
        margin: 5px;
        display: block;
        float: left;
        word-wrap:break-word;
     }

text that it's in

#p6 {
   font-family: Myriad Pro;
   margin: 1px;  
   font-size: 22px;
   background-color:#540f45;
   padding: 5px 5px 3px 4px;
   margin:4px;
}

a {
  text-decoration: none;
  color: white;
  text-align: right;
  font-family: Myriad Pro;
}

here is the php function that retrieves the data from the database

<p id='p6'><?php echo "<a href='' "</a>"; ?></p>

this is all wrapped in these two id's

body {
   background:#603e4f;
   display: block;

}

#foursquare {
    background-color:#603e4f;    width: 290px;
    display: block;
    position: absolute;
}

© Stack Overflow or respective owner

Related posts about php

Related posts about html