Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change direction of line-break in CSS?

Tags:

html

css

flexbox

I have p inside div, which is different from normal paragraph. It starts from bottom right, kind of like this

<p>

Main problem is when i enter more text line breaks in different direction.

What is happening.

enter image description here

What I want.

enter image description here

Here is my stylesheet:

div{
   display: flex;
   flex-direction: column;
   justify-content: flex-end;
  }

p{
   align-self: flex-end;
 }

Is it even possible?

like image 446
Sanatan Chaudhary Avatar asked Oct 16 '25 11:10

Sanatan Chaudhary


1 Answers

You want this ? See this fiddle

div{
   display: flex;
   flex-direction: column;
   justify-content: flex-end;
   background: red;
   width: 200px;
   height: 200px; 
  }

p{
   align-self: flex-end;
   color: #fff;
   text-align: right;
 }
like image 191
Vincent G Avatar answered Oct 18 '25 05:10

Vincent G



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!