Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1818 connectés 

  FORUM HardWare.fr
  Graphisme
  Web design

  [css] padding/margin sur une image?

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[css] padding/margin sur une image?

n°955407
noobite
The Flying Sushi
Posté le 05-06-2007 à 11:08:19  profilanswer
 

Salut à tous,
je suis en train de réaliser un site en jsp, rien de bien particulier par rapport au php (le code généré reste de l'html).
Mon soucis et que je créé un "cadre" dans lequel sera contenu le menu, le texte, les images,... le menu est composé  d'un tableau et l'image de fond ne colle pas au bord du "cadre" défini dans ma feuille de style malgré un padding et une margin fixé à 0px. Auriez-vous la solution à ce problème de style?
 
merci par avance.
 
ps: ce qui nous intéresse c'est donc body (cadre), td (menu).
 
 

Code :
  1. body {
  2. background-color: #FFFFFF;
  3. margin:0px;
  4. padding:0px;
  5. }
  6. .text{
  7. width:700px;
  8. margin: 10px;
  9. margin-left:30px;
  10. margin-bottom:30px;
  11. text-align:left;
  12. font-family: Arial;
  13. font-size:8pt;
  14. color:#394852;
  15. }
  16. .title{
  17. font-family: Arial;
  18. font-size:12pt;
  19. font-weight:bolder;
  20. margin-bottom: 7px;
  21. }
  22. .menu{
  23. text-align: center;
  24. padding: 0px;
  25. margin: 0px;
  26. }
  27. .right{
  28. float:right;
  29. margin: 20px;
  30. }
  31. td{
  32. width:898px;
  33. height:40px;
  34. background-color:white;
  35. background-image:url("../images/menu_background.png" );
  36. background-repeat:no-repeat;
  37. }
  38. a {
  39. width: 110px;
  40. height:30px;
  41. font-family:arial;
  42. font-size:12px;
  43. padding-left: 5px;
  44. color: #999999;
  45. }
  46. a:hover {
  47. width: 110px;
  48. height:30px;
  49. font-family:arial;
  50. font-size:12px;
  51. padding-left: 5px;
  52. color: #000000;
  53. }
  54. .main {
  55. width: 900px;
  56.     border:solid 1px #918D7E;
  57.     background-color: #FFFFFF;
  58.     margin-right: auto
  59.     margin-left: auto;
  60.     padding:0px;
  61.     }
  62.    
  63. tbody {
  64. text-align: center;
  65. margin-top: 0px;
  66. padding:0px;
  67. background-color: #050505;;
  68. font-family: Arial;
  69. font-size:8pt;
  70. }
  71. h1{
  72. font-family: arial;
  73. text-decoration: strong;
  74. text-align: center;
  75. }
  76. #topnav {
  77. width:650px;
  78. border:1px;
  79. border-bottom-style: solid;
  80. background-color:#3C3C3C;
  81. color:white;
  82. }
  83. #logo {
  84. border:1px;
  85. border-bottom-style:solid;
  86. padding: 0px;
  87. margin: 0px;
  88. }
  89. #pub {
  90. border:0;
  91. }
  92. #topnav A:HOVER {
  93. border-width: 2px;
  94. border-color: #CCCCCC;
  95. background:#050505;
  96. padding: 5px;
  97. }
  98. #CONTENT {
  99. text-align:left;
  100. padding:20px;
  101. color:#050505;
  102. }
  103. #thumb {
  104. border:1px;
  105. border-color:black;
  106. border-bottom-style:solid;
  107. border-top-style:solid;
  108. border-left-style:solid;
  109. border-right-style : solid;
  110. margin-left:10px;
  111. margin-right:10px;
  112. margin-bottom:7px;
  113. }
  114. .title {
  115. font-size:18px;
  116. color:#050505;
  117. font-weight:strong;
  118. letter-spacing: 1px;
  119. }
  120. img.right_illustration {
  121. position: float;
  122. float: right;
  123. margin: 20px;
  124. padding-bottom: 5px;
  125. clear:both;
  126. }


---------------
.: [Knowledge Is Power] || [Mon FeedBack] :.
mood
Publicité
Posté le 05-06-2007 à 11:08:19  profilanswer
 

n°955632
Lactique
Caraïbe et huile de coco
Posté le 05-06-2007 à 19:53:37  profilanswer
 

La csss s'applique avec hiérarchie en cascade, voir les class c'est bien mais impossible de savoir le resultat si on ne sait pas comment ton code est fait, le html, ou est ta balise td ? qui est son parent ? etc...
 
Pour comprendre ou est le décalage on utilise la technique des bordures, tu mets une bordure d' 1 pixel a un élément pour voir si il est bien placé. Tu en sauras plus sur la balise incriminée.
Ca peut aider.


---------------
Studio CréeAll

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Graphisme
  Web design

  [css] padding/margin sur une image?

 

Sujets relatifs
vidéo FLV : remplacer écran noir du début par imagePhotoshop : texte sur image
[Indesign] Découper une image?bensoin d'aide pour image oblitération
[Image ready] faciliter la vie pour aligner les framesimage bitmap pour grand format
Flash pro 8 faire apparaitre une image en fonduAgrandissement image
Copyright dans les <<propriétés>> de l'image.Une image en emitter avec Particule illusion
Plus de sujets relatifs à : [css] padding/margin sur une image?


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)