I have an unordered list that contains 3 list items (presented in my example as 3 green fields). Each box has an image and 3 divs (name, location, price). I'm only interested in every div title.
If the title is long enough so that it creates 2 lines, I want the top line to always be shorter than the bottom line. My demo site, seen here, shows boxes 1 and 2 with the wrong settings, and field No. 3 shows the correct settings.
I'm having problems ... it may take js to determine the length of the string, and then set the bottom line longer. Screen resolution is likely to play a role, but can I make the lines consistent across different screen sizes?
Here is one of the list items, I'm interested in the titlebox div:
<li class="list__item"> <figure class="list__item__inner"> <p class="vignette" style="background-image:url(http://www.ht-real-estate.com/template/ht2014/images/landscape/05.jpg)"></p> <div class="titlebox">This line is longer than this line</div> <div class="locationbox">Location</div> <div class="pricebox">Price</div> </li>
Any help is great, thanks!
Screenshot also: 
source share