CSS+div VS Tableaux

patamob -  
maaat80 Messages postés 18 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour Bonjour !

j'ai un tableau HTML qui fait ça :
<table width="100%">
<tr>
<td width="300" valign="middle">blabla</td>
<td align="top">blublu</td>
</tr>
</table>


comment faire la meme chose en DIV et CSS ?

A voir également:

1 réponse

maaat80 Messages postés 18 Date d'inscription   Statut Membre Dernière intervention   1
 
<div id="notreTableau">

<div class="xxx">
<p> blablablabla </p>
</div>

<div class="yyy">
<p> blublublu </p>
</div>

</div>


sur le fichier main.css :

#notreTableau {
width: 100%;
}

#xxx {
width: 300;
vertical-align: middle;
float: left;
}

#yyy {
margin: 0px;
padding: 0px;
}


NB: Pour l'id yyy, les margin padding remise a zero peuvent etre omis si tu initialise ton document dés le debut avec une declaration pour tout le document du genre:

h1, h2, h3, h4, h5, h6, p, ul, div, ....... {
margin:0px;
padding:0;
....
}
0