jquery - wrap text in second line if it's too long -


i have made on h1

h1 {  font: 13px bpg arial;  color: #fff;  text-shadow: 0 1px 0 rgba(0,0,0,.15);  line-height: 41px;  width: 476px;  padding: 0 5px;  height: 41px; } 

i don't know when client write long text , when short. want if there's big text it's make on second line.

i know must reduce line-height don't know how on current problem

jsfiddle

i suggest use white-space:normal instead of word-break: break-all. also, replace height min-height .newstitle class.

.newstitle { min-height: 41px; }  h1 { white-space:normal; min-height: 41px;  } 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -