2009-07-11 4 views
0

Scénario: Un en-tête DIV avec trois DIV à l'intérieur a flotter à gauche.Dépassement de texte Problème et texte Non Wrap

Problème: "Texte" de HEADER_A div déborde dans HEADER_B DIV et ainsi de suite.

Capture d'écran/CSS:

alt text http://thumb0.webshots.net/t/74/174/8/92/12/2239892120105349420zNlkOc_th.jpg

#header{ 
height:127px; 
width: 718px; 
} 

#header_a { 
    width:181px; 
    height: 127px; 
    color:#FFFFFF; 
    float:left; 
} 

#header_b{ 
width: 363px; 
float:left; 
height: 127px; 
/*background-image:url(../images/logo.jpg);*/ 
background-position:bottom; 
background-repeat:no-repeat; 
background-color:#006600; 
} 

#header_c{ 
width: 174px; 
float:left; 
height: 127px; 
} 

<div id="header"> 
     <div id="header_a">ddddddddddddddddddddddddddddddddddddddddddddddddddddddd</div> 
     <div id="header_b"></div> 
     <div id="header_c"><img src="images/nuevo.png" /></div> 
    </div> 

Répondre

2

ddddddddddddddddddddddddddddddddddddddddddddddddddddddd est> 181px.

Il va de soi qu'il déborde car il est pris en un seul mot et les mots ne sont pas divisés. Essayez d'utiliser un texte approprié ou donner un peu d'espace comme « ddddddddddd ddddddddddddd ddddddddddddddddd dddddddddddddd »

EDIT:

d'autre part, la même chose se produira aux images. Donc, tout ce qui est plus grand dans la div que son parent débordera. vous pouvez essayer d'utiliser 'overflow:hidden'