CSS formatting
Hi,
I am experiencing some problems when experimenting with formatting via a CSS.
I have a table element:
<table class="Table_Small" style="position: relative">
<tr >
<td >
<asp:Label ID="Label4" runat="server" Style="position: relative" Text="First Name"></asp:Label><br />
<asp:TextBox ID="txtFirstName" runat="server" Style="position: relative"></asp:TextBox>
</td>
<td></td>
</tr>
</table>
Here is the corresponding CSS (StyleSheet.css) entry:
.Table_Small
{
LEFT: 0px;
WIDTH: 550px;
COLOR: Black;
POSITION: relative;
TOP: 0px;
BACKGROUND-COLOR: White;
font-size: small;
text-align: left;
left: 0px;
position: relative;
top: 0px;
}
I have the following in the MasterPage.aspx:
<link rel="stylesheet" type="text/css" href="StyleSheet.css" />
The CSS formatting is applied when I switch to design view. However, when I open the page in my browser, the formatting is not applied. For example, I have a few textboxes in the table cells. In design view, they are aligned at the left side of the table cells, but in the browser, they are centered in the table cells. Also, even though I have specified a background color of white for the table, when I run the project, the background is blue, which is the background color of my master page.
I have not specified any formatting for the table rows or cells.
Can anyone explain to me why this approach will not work?
Thanks,
Mike
|