css - Justify text in a div with width 100% - 60px -


i have a

#menu {   width: calc(100vw - 60px);   left: 30px; } 

how can words justified in available space?

i'm tryin the

text-align:justify 

but doesn't work.

https://jsfiddle.net/ju0mz9t0/1/

i assume mean text. because text-align: justify doesn't justify last line of block of text. 1 workaround add css generated content item acts inline text item stretches full width of container so:

#menu:after {   content: '';   display:inline-block;   width: 100%; } 

#menu{  font-family: arial;  font-size:22px;  width: calc(100vw - 60px);  left: 30px;  text-align: justify;  text-justify: inter-word;  position:fixed;  }    #menu:after {    content: '';    display:inline-block;    width: 100%;  }
<div id="menu">  ss17 fw16/17 stockists  </div>


Comments