-1
votes

Comment obtenir deux tags div sans espace entre eux?

Je veux avoir deux lignes de pied de page que

 Entrez la description de l'image ici p>

Quand iam utilise deux tags div foe première rangée et deuxième rangée je suis Obtenir un espace et il ressort comme ci-dessous p>

 Entrez la description de l'image ici p>

p>

<div style="width:100%; clear:both;color:#4682b4;">
    <p style="float: left; width: 34%; text-align: left;">AAAA</p>
    <p style="float: left; width: 33%; text-align: center;">&nbsp;</p>
    <p style="float: left; width: 33%; text-align: right;">CCCC</p>
</div>
<div style="width:100%; clear:both;color:#4682b4;">
    <p style="float: left; width: 34%; text-align: left;">DDDD</p>
    <p style="float: left; width: 33%; text-align: center;">EEEE</p>
    <p style="float: left; width: 33%; text-align: right;">FFFF</p>
</div>


4 commentaires

espace ou rupture de ligne dans l'affaire actuelle?


non je n'ai aucun espace


Montrez-nous le code HTML & CSS


S'il vous plaît ajouter un snippet de code ou jsfiddle lien


3 Réponses :


0
votes

Votre utilisation de blocs de bloc 'P', qui incluent la marge automatique, veuillez supprimer cela et voir l'espace réduira

p>

<div style="width:100%; clear:both;color:#4682b4;">
    <p style="float: left; width: 34%; text-align: left;margin:0px">AAAA</p>
    <p style="float: left; width: 33%; text-align: center;margin:0px">&nbsp;</p>
    <p style="float: left; width: 33%; text-align: right;margin:0px">CCCC</p>
</div>
<div style="width:100%; clear:both;color:#4682b4;">
    <p style="float: left; width: 34%; text-align: left;margin:0px">DDDD</p>
    <p style="float: left; width: 33%; text-align: center;margin:0px">EEEE</p>
    <p style="float: left; width: 33%; text-align: right;margin:0px">FFFF</p>
</div>


0 commentaires

0
votes

Les navigateurs ajoutent automatiquement un espace (marge) avant et après chaque élément 'P ». Les marges peuvent être modifiées avec CSS (avec les propriétés de la marge). Vous devez donc éliminer les marges de la balise 'P' avec CSS P>

p>

<div style="width:100%; clear:both;color:#4682b4;">
    <p style="float: left; width: 34%; text-align: left;">AAAA</p>
    <p style="float: left; width: 33%; text-align: center;">&nbsp;</p>
    <p style="float: left; width: 33%; text-align: right;">CCCC</p>
</div>
<div style="width:100%; clear:both;color:#4682b4;">
    <p style="float: left; width: 34%; text-align: left;">DDDD</p>
    <p style="float: left; width: 33%; text-align: center;">EEEE</p>
    <p style="float: left; width: 33%; text-align: right;">FFFF</p>
</div>

0 commentaires

0
votes

Essayez ceci elet

p>

<div style="width:100%; color:#4682b4;">
    <p style="float: left;margin: 0 0 0 0; width: 34%; text-align: left;">AAAA</p>
    <p style="float: left; width: 33%;margin: 0 0 0 0; text-align: center;">&nbsp;</p>
    <p style="float: left; width: 33%;margin: 0 0 0 0; text-align: right;">CCCC</p>
</div>
<div style="width:100%; color:#4682b4;">
    <p style="float: left; width: 34%; margin: 0 0 0 0;text-align: left;">DDDD</p>
    <p style="float: left; width: 33%;margin: 0 0 0 0; text-align: center;">EEEE</p>
    <p style="float: left; width: 33%;margin: 0 0 0 0; text-align: right;">FFFF</p>
</div>


0 commentaires