I have a text inside a div but it happens that when the line breaks it moves to the right
<div style="width: 300px;"><b> aqui va el texto que cuando llega el momento de saltar linea se va hacia la derecha</b></div>
You could try moving just the box to the right. In this example you have
position: relative;
right: calc(300px - 100vw);
div {
width: 300px;
border: 1px solid;
position: relative;
right: calc(300px - 100vw);
}
<div><b> aqui va el texto que cuando llega el momento de saltar linea se va hacia la derecha</b></div>
Another possibility would be to use the old float:right
:
div {
width: 300px;
border: 1px solid;
float:right;
}
<div><b> aqui va el texto que cuando llega el momento de saltar linea se va hacia la derecha</b></div>
I hope it's what you need.