Specifies the alignment of the text inside an element.
Class | Properties |
---|---|
text-center | text-align: center; |
text-justify | text-align: justify; |
text-left | text-align: left; |
text-right | text-align: right; |
<div class="flex flex-wrap align-items-center justify-content-center">
<div class="surface-overlay border-round border-1 w-16rem min-h-full shadow-1 p-5 py-0 m-3">
<p class="text-center">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae sapien pellentesque habitant morbi tristique senectus et netus. Vitae proin sagittis nisl
rhoncus mattis. Maecenas pharetra convallis posuere morbi leo urna molestie.{' '}
</p>
</div>
<div class="surface-overlay border-round border-1 w-16rem min-h-full shadow-1 p-5 py-0 m-3">
<p class="text-justify">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae sapien pellentesque habitant morbi tristique senectus et netus. Vitae proin sagittis nisl
rhoncus mattis. Maecenas pharetra convallis posuere morbi leo urna molestie.{' '}
</p>
</div>
<div class="surface-overlay border-round border-1 w-16rem min-h-full shadow-1 p-5 py-0 m-3">
<p class="text-left">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae sapien pellentesque habitant morbi tristique senectus et netus. Vitae proin sagittis nisl
rhoncus mattis. Maecenas pharetra convallis posuere morbi leo urna molestie.{' '}
</p>
</div>
<div class="surface-overlay border-round border-1 w-16rem min-h-full shadow-1 p-5 py-0 m-3">
<p class="text-right">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae sapien pellentesque habitant morbi tristique senectus et netus. Vitae proin sagittis nisl
rhoncus mattis. Maecenas pharetra convallis posuere morbi leo urna molestie.{' '}
</p>
</div>
</div>
Responsive alternatives are available for customizations based on screen size. Add the responsive breakpoint keyword followed by a semi-colon as a prefix such as md:text-center to use a responsive class.
Class | Description |
---|---|
sm: | small screens e.g. phones |
md: | medium screens e.g. tablets |
lg: | large screens e.g. notebooks |
xl: | larger screens e.g monitors |
<div class="flex flex-wrap align-items-center justify-content-center">
<div class="surface-overlay border-round border-1 w-16rem min-h-full shadow-1 p-5 py-0 m-3">
<p class="text-left md:text-center">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae sapien pellentesque habitant morbi tristique senectus et netus. Vitae proin sagittis nisl
rhoncus mattis. Maecenas pharetra convallis posuere morbi leo urna molestie.{' '}
</p>
</div>
</div>