Codage CSS besoin d'aide, débutant

lilburrows Messages postés 643 Date d'inscription   Statut Membre Dernière intervention   -  
lilburrows Messages postés 643 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,
je suis un débutant dans le langage CSS, j'aurais donc besoin de votre aide si vous le voulez bien.
J'ai créé un petit site ou je met tout ce que j'ai appris à faire ces 3 derniers mois, tout est bon sauf pour le CSS.
Je souhaitais créé un tableau avec des bords arrondis à l'aide d'images (Bas, haut, milieu) mais malheureusement le "tableau" ne s'affiche pas correctement voyez par vous même :


Voici mon code:


<style type="text/css">

.boite {
margin: 0;
width: 800px;
20px 20px 5px 20px
background: transparent url(images/tableau/milieu.png) repeat-y;
background-position: center center;
text-align: center;
}
.boite h3 {
margin: 0;
padding: 20px 20px 5px 20px;
background: transparent url(images/tableau/bas.png) no-repeat;
background-position: center bottom;
text-align: center;
}
.boite h2 {
margin: 0;
padding: 20px 20px 5px 20px;
background: transparent url(images/tableau/haut.png) no-repeat;
background-position: center top;
text-align: center;
}

.boite p {
margin: 1em 20px;
text-align: justify;
}



Et voici le contenu (c'est un test) :

<div class="boite">
<h2>Blabla</h2>
<p>rthrthrt rthrthtrh rt rthtrh re ht rthrthrt rthrthtrh rt rthtrh re htrthrthrt rthrthtrh rt rthtrh re htrthrthrt rthrthtrh rt rthtrh re htrthrthrt rthrthtrh rt rthtrh re ht</p>
<p>rthrthrt rthrthtrh rt rthtrh re ht rthrthrt rthrthtrh rt rthtrh re htrthrthrt rthrthtrh rt rthtrh re htrthrthrt rthrthtrh rt rthtrh re htrthrthrt rthrthtrh rt rthtrh re ht</p>
<h3>...</h3>
</div>


J'aimerais donc savoir ce qui cloche dans mon code.
Je vous remercie et vous souhaites à tous une excellent journée !


Et voici ce que ca donne sur ma page :
http://urbanrevolution.chez.com/accueil.html
A voir également:

5 réponses

NookZ Messages postés 2138 Date d'inscription   Statut Membre Dernière intervention   514
 
Vous avez juste à entourer le texte sous </h2> et avant <h3> avec un autre type de balise, par exemple un div pour y appliquer le style de .boite
0
lilburrows Messages postés 643 Date d'inscription   Statut Membre Dernière intervention   61
 
D'accord j'essaie ça dans 30 mn dès mon retour et je vous tiens au courant.
Merci !

Et aussi ça règlera le problème du tableau non-centré ?
0
lilburrows Messages postés 643 Date d'inscription   Statut Membre Dernière intervention   61
 
J'ai fait ce que j'ai cru comprendre mais ça ne marche pas.
Voici le code :


<div class="boite">
<h2>Blabla</h2>
</div>
<div class="boite p1">
<p>rthrthrt rthrthtrh rt rthtrh re ht rthrthrt rthrthtrh rt rthtrh re htrthrthrt rthrthtrh rt rthtrh re htrthrthrt rthrthtrh rt rthtrh re htrthrthrt rthrthtrh rt rthtrh re ht</p>
<p>rthrthrt rthrthtrh rt rthtrh re ht rthrthrt rthrthtrh rt rthtrh re htrthrthrt rthrthtrh rt rthtrh re htrthrthrt rthrthtrh rt rthtrh re htrthrthrt rthrthtrh rt rthtrh re ht</p>
</div>
<div class="boite">
<h3>...</h3>
</div>

J'ai renommé la première boîte (celle ou il y a milieu.png) boite p1 {
0
NookZ Messages postés 2138 Date d'inscription   Statut Membre Dernière intervention   514
 
ah bah je sais pas alors, désolée, je pensais que ça marcherait :s
0
lilburrows Messages postés 643 Date d'inscription   Statut Membre Dernière intervention   61
 
Y a pas de mal merci quand même
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
lilburrows Messages postés 643 Date d'inscription   Statut Membre Dernière intervention   61
 
Quelqu'un d'autre a une idée ?
0