Hinweis: Ich bin ein Super-Anfänger oder Amateur in CSS.Warum kommen Eingabeobjekte außerhalb des div?
Ich habe ein CSS-Problem. Hier ist die html: -
<div class="obj-cont">
<div class="lbl-cont"><label>Post Title :</label></div>
<div class="input-cont"><input type="text" name="title" id="title" value="" required/></div>
</div>
Hier ist die CSS: -
.form-container{border: 1px #ccc solid; border-radius: 5px; height: auto; padding: 10px; width: 70%; margin-left: 10%;}
.obj-cont{padding: 5px; width: 300px; height:auto; border: 1px solid #000;}
.lbl-cont{float:left; width: 80px}
.input-cont{float:left; width: 80px}
Wie kann ich dieses Problem lösen?
Hinzufügen eines zusätzlichen HTML-Tags nur für Clearfix wird nicht empfohlen. Das CSS sollte vom HTML getrennt sein. – jahav