Right now the star is at the bottom of the textarea. How to align the star in below html vertically to the middle of the textarea.
Here is the html
<table>
<tr>
<td valign="middle">
<textarea id="txtDescription"></textarea>
<span class="star">*</span>
</td>
</tr>
</table>
And the style
.star
{
color: #ff0000;
margin: 0 0 0 5px;
}
Here is the demo
Create a new <td>
and add there star:
html
<table>
<tr>
<td valign="middle">
<textarea id="txtDescription"></textarea>
</td>
<td>
<span class="star">*</span>
</td>
</tr>
</table>
just take span into another td tag
check
<table>
<tr>
<td valign="middle">
<textarea id="txtDescription"></textarea>
</td>
<td> <span class="star">*</span>
</td>
</tr>
</table>
I have done using css float inside 'td' tag and working DEMO
CSS
textarea{
float:left;
}
span{
float:right;
margin:10px;
color:green;
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.