Answer the question
In order to leave comments, you need to log in
How to align text in the center of the screen?
How to align text in the center of the screen?
<div class="header">
<div class="container-fluid">
<div class="row">
<div class="col-md-3 col-xs-4 col-sm-3">
<a href="index.html"><img src="image/logo.png" alt="logo" class="img-responsive"></a>
</div>
<div class="col-md-8">
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-4 col-xs-4 col-sm-4">
</div>
<div class="col-md-6 col-xs-5 col-sm-5">
<div class="nadp">
<h1 class="lead">Текст</h1>
<h2 class="lead">Текст_2</h2>
</div>
</div>
</div>
</div>
</div>
</div>
.header{
width: 100%;
height: 100%;
vertical-align: middle;
}
.nadp{
}
.nadp h1, .nadp h2{
color: #fff;
text-align: center;
font-size: 'Sylfaen Regular';
display: inline-block;
}
.nadp h1{
padding: 1%;
font-size:6vw;
border-bottom: 3px solid #fff;
}
.nadp h2{
font-size:3vw;
}
Answer the question
In order to leave comments, you need to log in
Hint:
display: table-cell; cervical-align:middle; height:100%;
Well, in order for everything to work, you still need to add everything
.nadp set height and width
position: fixed;
margin: auto;
top: 0;
right: 0;
bottom: 0;
left: 0;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question