I want to add a close button to the div to mimick a forms close button.
Im trying to add the image to the title div but my image just displays at the end of the title text.
Im unsure of how to get the image to align to the right of the div.
One more thing, the div will vary in width. I dont always know how wide the <div> is going to be as it will change based on its content that is displayed in the div.
Any help would be appreciated.
[code]
.cBody
{
border-color:#313031;
border-style: solid;
border-width:thin;
overflow:auto;
}
.cTitle
{
background-color: #313031;
overflow:auto;
color:white;
font-size:14px;
font-weight:bold;
width: 100%;
}
.cContent
{
height:100%;
background-image: url(Images/background_10.gif);
padding-left:3px;
padding-right:3px;
padding-bottom:3px;
}
.cClose
{
/* Dont know what to put here. Have tried text-align:right, float: right*/
}
<div class=”cBody”>
<div class=”cTitle”>View Results
<div class=”cClose”><img src=”/images/close.gif”></div>
</div>
<div class=”cContent”>
‘Content Goes Here
</div>
</div>