Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 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 Respostas
+ 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.