in a table would like to display text as below in one of it’s cell and also have a same background for the whole block which will be the tablecell. Have other stuff displaying in other cells.
sample — bold
This is a sampe text
tried to do the same by using the below code
<tr >
<td>
<tr>
<td class=”bold-label” >
<bean:message key=”lbl.sample”/>
</td>
</tr>
<tr>
<td class=”label-Table” >
<bean:message key=”lbl.sampledesc”/>
</td>
</tr>
</td>
</tr>
In the css file
.bold-label{
border: 0;
border-width: 0;
padding: 0.3em;
vertical-align: top;
text-align: left;
font-family: Times New Roman;
font-size: 12px;
font-weight: bold;
padding-bottom: 0px;
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
background: #D3D3D3;
}
.label-Table {
border: 0;
border-width: 0;
padding: 0.3em;
vertical-align: top;
text-align: left;
font-family: Times New Roman;
font-size: 14px;
font-weight: Normal;
padding-bottom: 0px;
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
background: #D3D3D3;
}
I did give the border as none. But still getting a gap between rows i.e between the text Sample and the message below it.
I know I try using the <p>. But trying to do this only using the table. how can this be done using tables?
I would appreciate your help. thanks.