0

So i have a div for a title of an image in html and it has fixed height.with current font-size two lines of text fit perfect in it but if title is large then it overflows the div. all i want is to reduce the text size and keep it inside the dive without using overflow auto etc.second option is if i can reduce the title to limited number of words using PHP or JS so it stays fit . but my proprity is to reduce font-size and display full title.

<div class="title"><?php echo $title ?></div>
Nav Sandhu
  • 73
  • 1
  • 1
  • 6
  • 1
    Can you not use this : http://stackoverflow.com/questions/16056591/font-scaling-based-on-width-of-container – Gurtej Singh Mar 31 '17 at 06:40
  • 4
    Possible duplicate of [Font scaling based on width of container](http://stackoverflow.com/questions/16056591/font-scaling-based-on-width-of-container) – Gurtej Singh Mar 31 '17 at 06:41

0 Answers0