+ 2
CSS Alignment Styling !
Can we justify a center aligned paragraph? Eg: HTML; <p class=âStylingâ> Can this paragraph be centered and justified</p>
6 Answers
+ 26
if you want to get justified paragraph use syntax below
p{
text-align:justify;
}
http://jkorpela.fi/www/justify.html
+ 3
@ihateonions I tried but didnât work âđ»âđ»
+ 3
@elizabeth Thanks đ, But is it possible to both align right or left or center and justify both at the same time?
+ 3
@scurrilus Thanks for that tip! đđđ»
+ 2
try this, text-align: justify; text-align-last: center;
+ 2
Only one parameter for text align. You can overwrite it at the next line or an modifier class at your element. Donât overwrite it on the next line. It works but is not good codestyle. Do it in the following way For example: <p class=âalign alignâleft alignârightâ>test</p>. And .align { text-align: center} .alignâleft { text-align: left} .alignâright { text-align: right}. The p display the text right aligned. Make shure that you donât have to many overwrites because your css goes bigger for Code you donât need. Only one will be use.