Im Rahmen eines Schulprojektes hab ich ein Webdesign gestaltet und bin gerade auf ein problem gestoßen:
Die Website hat 2 content bereiche links und rechts,
im linken habe ich eine post klasse mit headline und text. Die größe passt sich automatisch dem Inhalt an.
Wenn ich jetzt aber mein bild in dem div container einfüge UND float:left / float:right
mache, wird das bild zwar umflossen, aber der div container mit dem post passt sich nichtmehr der größe an.

die betroffenen bereiche:
Code:
#post
{
clear: both;
margin-top:0;
margin-bottom:10px;
margin-right:3%;
margin-left:3%;
padding-top:0;
padding-bottom:0px;
padding-right:0%;
padding-left:0;
width: 94%;
border: 1px dotted silver;
min-height: 100px;
margin-bottom: 45px;
font-family: 'Noto Sans', sans-serif;
}
.headline
{
font-size: 1.4em;
position:relative;
text-align: left;
width: 95%;
top: 4px;
padding-left: 14px;
border-bottom: 1px dotted black;
}
.text
{
clear: both;
font-size: 0.95em;
position:relative;
text-align: left;
padding: 16px;
}
Code:
#bild {
float: left;
border: thin silver solid;
margin: 0.5em;
padding: 0.5em;
margin-bottom: 10px;
}
#bild p {
text-align: center;
font-size: smaller;
}
.scaled {
width: 100%;
}
hoffe ihr könnt mir helfen
Mit freundlichen Grüßen
Klenix






