What is the best way to ensure a div expands when it contains a lot of content?
Code Example (HTML):
<div class="content">
Content goes here <br />
Content goes here <br />
Content goes here <br />
Content goes here <br />
Content goes here <br />
Content goes here <br />
Content goes here <br />
</div><br />
<div class="click-to-expand">Click here to see more</div>
CSS:
div.content
{
height:100px;
width:300px;
border:1px solid red;
overflow:hidden;
}
div.click-to-expand
{
border:1px solid green;
width:200px;
}
Check out this example: http://jsfiddle.net/nvCvy/1/
JQuery or CSS?
Would implementing a JQuery scroll function be more effective, or should everything be displayed using only CSS?