Reputation: 82
I have a div that is child to one parent. text-align:justify doesnt work on it.
Child HTML:
<div id="right-text">По легенде, у расположенного на центральном острове<br>
Ворсменского озера Свято-Троицком монастыре были
большие<br> связи с купечеством и представителями Италии.</div>
Child CSS:
#right-text {
width: 800px;
height: 400px;
display: flex;
flex-direction: column;
text-align: justify;
}
Parent CSS:
#wrapper {
overflow-x: hidden;
height: 100%;
width: 100%;
background-color:#fff5e5;}
And what I get: [![enter image description here][1]][1]
Any suggestions would be appreciated.
Upvotes: 2
Views: 328
Reputation: 5518
You have to remove the <br>
tags in order for the text justification to work. Then you can add a margin or width on the block of text.
Upvotes: 3