how to set auto height of div as image(in div) height increases

Jak
Jak
Member
858 Points
132 Posts

I have following html:

<divclass="post">

<div>

<img alt="Blog Image" src="18.jpg"/>

</div>

<div>

<h1>

<a style="color: #E5017D;" href="BlogsView.aspx?ID=1">hi</a></h1>

</div>

</div>

Views: 8805
Total Answered: 1
Total Marked As Answer: 0
Posted On: 13-Oct-2014 00:34

Share:   fb twitter linkedin
Answers
Rahul Maurya
Rahul M...
Teacher
4822 Points
23 Posts
         
HI, use this:
 
<style>
.postimg
{
 
border: 1pxsolid#ddd;
width: 280px;
float: left;
padding: 0px;
margin: 0px5px0px0px;
}
.post
{
 
margin: 10px0;
width: 600px;
padding: 10px;
border: 1pxsolid#C9E5E9;
border-radius: 15px15px15px15px;
-moz-border-radius: 15px15px15px15px;
-webkit-border: 15px15px15px15px;
background: #F5FEFF;
min-height:100px;
}
.post
{
 
height:auto;
}
 
</style>
Posted On: 13-Oct-2014 00:39
 Log In to Chat