我真的很接近让它看起来像我想要的那样:)
我如何:
提前感谢您的帮助!
#tk17-speakings-termine-ausgabe ul{
max-width:500px;
}
#tk17-speakings-termine-ausgabe li{
display:inline-block;
list-style-type:none;
width:50%;
padding-left:25%;
padding-right:25%;
}
.tk17-speakings-ausgabe-datum{
width:200px;
height:200px;
text-align:center;
border:2px solid #c4d600;
float:left;
margin-right:40px;
}
.tk17-speakings-ausgabe-datum h3{
font:300 60px / 60px Lato;
margin-bottom:0;
margin-top:50px;
}
.tk17-speakings-ausgabe-datum h4{
font:300 20px / 22px Lato;
margin-top:0;
}
.tk17-speakings-ausgabe-title{
margin-top:-20px;
}
.tk17-speakings-ausgabe-daten-container{
margin-top:30px;
}
.tk17-speakings-ausgabe-daten-col1{
float:left;
width:20%;
}
.tk17-speakings-ausgabe-daten-col2{
width:75%;
margin-left:5%;
}
<ul>
<li>
<div class="tk17-speakings-ausgabe-datum">
<h3>11</h3>
<h4>Juni<br>2017</h4>
</div>
<div class="tk17-speakings-ausgabe-title">
<p><span class="tk17-spitzmarke">THEMA</span><br><span class="tk17-headlinetext-300-3033">Lorem ipsum dolor sit amet</span></p>
</div>
<div class="tk17-speakings-ausgabe-daten-container">
<div class="tk17-speakings-ausgabe-daten-col1">
<p><span class="tk17-spitzmarke">VERANSTALTUNG</span><br><span class="tk17-fliess-400-1522">Veranstaltung GHI...</span></p>
<p><span class="tk17-spitzmarke">ORT</span><br><span class="tk17-fliess-400-1522">Frankfurt, Xxxxxxxxxx<br><br><em>[offen]</em></span></p>
</div>
<div class="tk17-speakings-ausgabe-daten-col2 tk17-fliess-400-1522">
<p><span class="tk17-spitzmarke">DETAILS</span><br></p><p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
</div>
</div>
</li>
</ul>
答案 0 :(得分:1)
由于p
元素中的边距,行中的内容未水平对齐。要防止.tk17-speakings-ausgabe-daten-col2
缠绕,请使用overflow: hidden
#tk17-speakings-termine-ausgabe li {
display: inline-block;
list-style-type: none;
width: 50%;
padding-left: 25%;
padding-right: 25%;
}
.tk17-speakings-ausgabe-datum {
width: 200px;
height: 200px;
text-align: center;
border: 2px solid #c4d600;
float: left;
margin-right: 40px;
}
.tk17-speakings-ausgabe-datum h3 {
font: 300 60px / 60px Lato;
margin-bottom: 0;
margin-top: 50px;
}
.tk17-speakings-ausgabe-datum h4 {
font: 300 20px / 22px Lato;
margin-top: 0;
}
.tk17-speakings-ausgabe-title {
margin-top: -20px;
}
.tk17-speakings-ausgabe-daten-container {
margin-top: 30px;
}
.tk17-speakings-ausgabe-daten-col1 {
float: left;
width: 20%;
}
.tk17-speakings-ausgabe-daten-col2 {
margin-left: 5%;
overflow: hidden;
}
p {
margin-top: 0;
}
<ul>
<li>
<div class="tk17-speakings-ausgabe-datum">
<h3>11</h3>
<h4>Juni<br>2017</h4>
</div>
<div class="tk17-speakings-ausgabe-title">
<p><span class="tk17-spitzmarke">THEMA</span><br><span class="tk17-headlinetext-300-3033">Lorem ipsum dolor sit amet</span></p>
</div>
<div class="tk17-speakings-ausgabe-daten-container">
<div class="tk17-speakings-ausgabe-daten-col1">
<p><span class="tk17-spitzmarke">VERANSTALTUNG</span><br><span class="tk17-fliess-400-1522">Veranstaltung GHI...</span></p>
<p><span class="tk17-spitzmarke">ORT</span><br><span class="tk17-fliess-400-1522">Frankfurt, Xxxxxxxxxx<br><br><em>[offen]</em></span></p>
</div>
<div class="tk17-speakings-ausgabe-daten-col2 tk17-fliess-400-1522">
<p><span class="tk17-spitzmarke">DETAILS</span><br></p><p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
</div>
</div>
</li>
</ul>