Ich habe ein Problem mit einem div und Bilder, sie überschneiden sich sogar, wenn es Inhalt in der Div. Ich verwende Bootstrap für das Grid-System.Wie div von der Überlappung zum Bild zu stoppen?
Dieses Bild zeigt das Problem:
in JSFiddle meinen Code Hier ist
.news-section {
\t height: 500px;
\t background-color: #F1EFEF;
}
.news-title {
\t margin-top: 50px;
\t height: 60px;
\t background-color: #4A90E2;
\t display: inline-block;
\t text-align: center;
}
.news-title > h3 {
\t vertical-align: middle;
}
.videos-title {
\t margin-top: 50px;
\t height: 60px;
\t
\t background-color: #3F444A;
\t color: #fff;
\t display: inline-block;
\t text-align: center;
}
.videos-title > h3 {
\t vertical-align: middle;
}
.news-content {
\t margin-top: 25px;
\t display: inline-block;
}
.videos-content {
\t margin-top: 25px;
\t display: inline-block;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.5/css/bootstrap-flex.css" rel="stylesheet"/>
<section>
<div class="container">
<div class="row">
<div class="news-section">
<div class="col-md-6 col-xs-12 news-title">
<h3>Lo más nuevo</h3>
<div class="news-content">
<img class="img-responsive" src="http://placehold.it/500x400" alt="" >
</div>
</div>
<div class="col-md-6 col-xs-12 videos-title">
<h3>Nuestros videos más nuevos</h3>
<div class="news-content">
<img class="img-responsive" src="http://placehold.it/500x400" alt="" >
</div>
</div>
</div>
</div>
</div>
</section>
Ich kann das Problem nicht, um zu replizieren scheinen zu untersuchen, wie es zu beheben. Könnten Sie uns das Problem erklären? – Tapu
Ich habe die Arbeitsversion hinzugefügt, außerdem habe ich festgestellt, dass der Fehler, der das Problem verursacht, 'float: left' von col-xs-12 ist, aber ich weiß nicht, wie ich es löschen kann, ohne meine Desktop-Version zu beeinflussen. –