0

I have a Panel that contains a bunch of TextBoxes. I have added the margin attribute to my CSS file. Currently, I can get it to display properly in Firefox, but when I view it in IE and Chrome there is no margin.

Textbox

asp:TextBox ID="txtInvoiceDate" Font-Bold="true" runat="server" CssClass="TextBox"></asp:TextBox>

CSS

.TextBox { margin: 5px; }

Initially when I save the project, it will display the margins. When I refresh the page, the margins disappear.

Any help would be greatly appreciated.

kevorski
  • 816
  • 1
  • 11
  • 29

1 Answers1

0

After more research, I found that the margin attribute was being overridden by the User Agent Style Sheet. I added some new CSS to the file and voila...it's properly working.

I found the answer via What is user agent stylesheet

Community
  • 1
  • 1
kevorski
  • 816
  • 1
  • 11
  • 29