align = middle ... ROGNTUDJU

align = middle ... ROGNTUDJU - HTML/CSS - Programmation

Marsh Posté le 22-09-2008 à 15:58:36    

Bonjour
 
voici mon debut de code (htm)
 

Code :
  1. <body>
  2. <div align= "middle" valign = "top">
  3. <table align= "middle" valign = "top" width = "1024">
  4. <tr>
  5.  <td width = "50" id = "vide">
  6.   &nbsp;
  7.  </td>
  8.  <td width = "180" id = "colone">
  9.   <div id ="id1">
  10.   <h3>propriétaires</h3>
  11.   <p>Vendez un bien :</p>
  12.   </div>
  13.   <div id ="id1">


[/cpp]
ci dessous mon css
 

Code :
  1. body
  2. {
  3. background-image:url('http://pulbot.free.fr/images/degra_ciel.jpg');
  4. fontfamily : "Alba Super";
  5. align : middle;
  6. vertical-align : top;
  7. margin : 0 0 0px ;
  8. padding : 0px ;
  9. }
  10. table
  11. {
  12. align : middle;
  13. vertical-align : top;
  14. margin : 0 0 0px ;
  15. padding : 0px ;
  16. }
  17. td
  18. {
  19. background : #ffffff ;
  20. border : 0px solid #ffffff ;
  21. vertical-align : top;
  22. margin : 0 0 0px ;
  23. padding : 0px ;
  24. }
  25. #vide
  26. {
  27. background-image:url('http://pulbot.free.fr/images/degra_ciel.jpg');
  28. margin : 0 0 0px ;
  29. padding : 0px ;
  30. vertical-align : top;
  31. }
  32. #colone
  33. {
  34. background : #0099CC;
  35. border : 0px solid #0099CC;
  36. align : left ;
  37. vertical-align : top;
  38. margin : 0 0 0px ;
  39. padding : 0px ;
  40. }
  41. #colone div h3
  42. {background : #00499f url(/images/fond-menu-accueil.gif) ;
  43. padding : 0 0 0 6px ;
  44. line-height : 18px ;
  45. font-size : 14px ;
  46. border : 1px solid #7db5de ;
  47. color : #00336f ;
  48. text-transform : uppercase ;
  49. margin : 0 ;
  50. vertical-align : top;
  51. }


 
Bon le problème est simple  :pt1cable:  
je n'arrive pas à centrer mon <table>
pouvez vous m'aider ?


---------------
http://www.ypikay.com
Reply

Marsh Posté le 22-09-2008 à 15:58:36   

Reply

Marsh Posté le 22-09-2008 à 16:25:45    

middle c'est pour le positionnement vertical
top,middle,bottom=>vertical-align:middle;
left,center,right=>text-align:center;
 
rien ne vaut la balise center parfois :D


---------------
Photos Panoramiques Montagnes Haute Savoie
Reply

Marsh Posté le 22-09-2008 à 16:50:45    

certes mais quand je mettais une balise center (hou le tricheur) ça centrait tout, tout, tout beuark
bon je vais voir ça
merci


---------------
http://www.ypikay.com
Reply

Marsh Posté le 22-09-2008 à 16:53:04    

bon, ça ne marche pas, je veux centrer mon <TABLE> alors, le gros gag :
ca marche sous FF mais pas sous IE, évidemment


---------------
http://www.ypikay.com
Reply

Marsh Posté le 22-09-2008 à 19:02:11    

met un doctype sur ta page et met margin-left:auto; margin-right:auto sur le table
 

Reply

Marsh Posté le 23-09-2008 à 16:33:39    

Je vois pas pourquoi ça marcherait pas si tu mets uniquement ton tableau dans un :
 
<div align=center>
</div>
 
:??:

Reply

Marsh Posté le 23-09-2008 à 19:17:58    

mais parce que la align ca n'existe plus c'est déprécié

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed