RawShed
Kilopat
- Katılım
- 19 Temmuz 2015
- Mesajlar
- 334
- Çözümler
- 4
Arkadaşlar resmin ortasına yazıyı eklemeye çalışıyorum olmuyor. Display flex yaptığında yazılar yan yana gelmiyor. Ortada hiç değil. Yardımcı olabilecek var mı?
HTML:
<!--Main Section-->
<section id="mainSlider" class="slider">
<div id="mainCaption" class="caption">
<h1>Lorem Ipsum is simply dummy text of the printing and typesetting industry</h1>
<p>Lorem Ipsum has been the industry's</p>
</div>
</section>
CSS:
#mainSlider {
height: 500px;
background: url('../img/motormain.jpg') center center no-repeat;
background-size: cover;
}
.slider {
width: 100%;
}
#mainCaption {
width: 500px;
}
.caption {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
color: #fff;
}