javascript - Limit paragraph height to height of image in another div -


i'm using 2 column layout responsive blog site. left column uses image, scaled fill width of column, , right column contains extraction of text blog post.

any ideas on how might able limit height of paragraph of text in right hand column match height of image in left column browser width reduced?

i plan use text-overflow: ellipsis handle overflow of text in right hand div.

example before , after image below.

example before , after resizing browser

here's html, , css i've used set size of image resize browser window reduced in size.

<div class="row blogpost">     <div class="sevencol">         <img src="img/greybox.png">     </div>     <div class="fourcol last>         <p>contrary popular belief, lorem ipsum not random text. has roots in piece of classical latin literature 45 bc, making on 2000 years old. richard mcclintock, latin professor @ hampden-sydney college in virginia, looked 1 of more obscure latin words, consectetur, lorem ipsum passage, , going through cites of word in classical literature, discovered undoubtable source.         </p>         <a class="readmore" href="#">read more...</a>     </div>   .blogpost .sevencol img {         zoom: 2;         margin: auto;         height: auto;         max-height: 100%;         width: auto;         max-width: 100%;         margin-top: 8px;     } 

you typically javascript.

evaluate image container's height once page has rendered, apply same height caption container.

you may have separate "read more" link content paragraph length mean apply overflow effect.

assuming you're using jquery, may this:

$(document).ready(function(){    var imgheight = $('#imagecontainer').height();    $('#caption').css('height', imgheight); }); 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -