dyarosh
asked on
How to format the first column of my table using CSS
I have a web page that has a two-column layout. Inside the left column I have a table with 2 columns. I want to format the first column to have the text right-justified but can't get the CSS to work. I know there is a way to do this without having to put a class on each <td> of the table but haven't figured it out. Any help is greatly appreciated!
HTML:
CSS
HTML:
<div id="FixedArea">
<div id="GeneralGuidelines">
<h2>General Guidelines for Referral Type Name</h2>
<textarea style="width: 100%" cols="1" rows="5">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</textarea>
</div>
<div id="RequesterInfo">
<h2>Requester Info Area</h2>
<table class="RequesterInfoTable">
<tr>
<td>Name</td>
<td>Employee Name</td>
</tr>
</table>
</div>
</div>
CSS
#FixedArea
{
width: 100%;
background-color: #ccc;
padding: 5px;
overflow: auto;
}
#GeneralGuidelines
{
width: 50%;
padding: 5px;
float: right;
}
#FixedArea h2
{
font-weight: bold;
font-size: small;
padding: 0px;
margin: 0px;
text-align: center;
}
#GeneralGuidelines textarea
{
font-size: smaller;
}
#RequesterInfo
{
width: 50%;
font-size: smaller;
}
.RequesterInfoTable
{
width: 100%;
border: 1px;
}
.RequesterInfoTable td
{
width: 50%;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER