J'essaye de faire une page Web simple mais je ne peux pas obtenir la page à emballer dans la section de corps, barre de défilement ou non. Le texte sur la page continue à aller dans l'infini. La feuille CSS est la suivante:Dreamweaver CSS - Text wont wrap
@charset "utf-8";
*{
background-color:#CCC;
margin:0;
padding:0;
}
body {
font-family: Verdana, Geneva, sans-serif;
font-size: 15px;
font-style: normal;
color: #609;
text-align:left;
}
#container
{
margin-left:auto;
margin-right:auto;
background-color: #CCC;
height: 768px;
width: 1366px;
border: thin solid #FFF;
}
#header
{
height: 50px;
width: 1214px;
border-bottom-width: thin;
border-bottom-style: solid;
border-bottom-color: #FFF;
clear: right;
float: right;
border-right-width: thin;
border-right-style: solid;
border-right-color: #FFF;
}
#sitelogo
{
float: left;
height: 101px;
width: 150px;
border-bottom-width: thin;
border-bottom-style: solid;
border-right-color: #FFF;
border-bottom-color: #FFF;
border-left-color: #FFF;
border-right-width: thin;
border-right-style: solid;
border-top-color: #FFF;
}
#lrftnavbar
{
clear:both ;
float: left;
height: 616px;
width: 150px;
border-right-width: thin;
border-right-style: solid;
border-right-color: #FFF;
}
#navbar
{
float: right;
height: 50px;
width: 1214px;
border-bottom-width: thin;
border-bottom-style: solid;
border-bottom-color: #FFF;
border-right-width: thin;
border-right-style: solid;
border-right-color: #FFF;
}
#footer
{
clear: both;
float: left;
height: 50px;
width: 1353px;
border-top-width: thin;
border-top-style: solid;
border-top-color: #FFF;
}
#body
{
background-color: #CCC;
height: 610px;
width: 1180px;
white-space: nowrap;
overflow: scroll;
float: left;
clear: none;
padding: 15px;
margin:auto;
}
.new
{
font-size: 9px;
font-style: italic;
color: #630;
background-color: #0FF;
}
#utube
{
background-color: #CCC;
float: left;
height: 240px;
width: 320px;
border: thin solid #FFF;
margin-top: 0px;
margin-right: 15px;
margin-bottom: 15px;
margin-left: 0px;
}
Le contenu que je mets dans le code HTML #body div continue à aller, malgré le conteneur et wont go à la ligne suivante. En outre, le texte va au-dessus de la div youtube, entre celle-ci et la bordure de la barre de navigation supérieure (navbar) au-dessus. Y a-t-il un moyen correct de l'espacer? mettre une marge là-bas ne fait que déplacer la div youtube plus bas. Toute aide appréciée, n'hésitez pas à demander des précisions supplémentaires.
S'il vous plaît éviter W3Schools. Mieux vaut lire à ce sujet de [W3C] (http://www.w3.org/TR/CSS2/text.html#propdef-white-space) ou [MDN] (https://developer.mozilla.org/en -US/docs/CSS/white-space) –