css - How to perform justify for anchor tags in html -


i added text-align:justify in body tag,

body {   text-align:justify; } 

all of text got justified except anchor links.

image

can suggest me class justify anchors well?

to trigger justify on single line(which happens last), can use text-align-last

the text-align-last css property describes how last line of block or line, right before forced line break, aligned.

body {   text-align:justify;   text-align-last:justify; } 

p, {    max-width:500px;    text-align:justify;    text-align-last:justify;      }  {    color:red;    background:yellow;  }  body>a {  display:block;    }
<p>pellentesque habitant morbi enim ac dui. donec non enim in turpis pulvinar facilisis. ut felis. praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. aliquam erat volutpat. nam dui mi, tincidunt quis, <a>accumsan porttitor, facilisis luctus, metus</a></p>  <hr/>  <a>accumsan porttitor, facilisis luctus, metus</a>

not yet supported everywhere https://caniuse.com/css-text-align-last/embed/


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -