So I have a DIV that contains some dynamic text. Let\'s say I know the text and font-size but I don\'t know the size of the DIV. I\'d like the display of the text in the DIV t
Use the CSS text-indent
property:
.box {
border: 1px solid #ffffd;
background: #fff;
max-width: 300px;
padding: 15px 15px 15px 45px;
}
.box p {
font-family: Arial, sans-serif;
line-height: 1.5;
margin: 0;
text-align: justify;
font-size: 12px;
text-indent: -30px;
}
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illo repellendus natus minima ex possimus? Pariatur odit distinctio, similique, adipisci nesciunt molestias iusto ipsa repellendus recusandae unde, enim veniam voluptatem expedita.