Answer the question
In order to leave comments, you need to log in
Why is the block not centered?
Why is the block not centered?
<div class="container">
<div class="block1"><img src="images/1234 Custom.png" width="250"; height="350"; alt=""></div>
<div class="block1"><span>Деревянно-алюминиевые окна
Цена от 83 600 руб за м2.</span></div>
</div>
.container {
width: 270px;
text-align: center;
}
.block1 {
width: 250px;
text-align: center;
}
Answer the question
In order to leave comments, you need to log in
.container {
width: 270px;
text-align: center;
margin: 0 auto;
}
Everything you wrote in the comments above is correct.
`text-align: center;` - usually used for text.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question