BUG: When You Use the STYLE Tag to Change the Body Border, It Changes the Top Border of the Controls (331959)
The information in this article applies to:
- Microsoft ASP.NET (included with the .NET Framework 1.1)
- Microsoft ASP.NET (included with the .NET Framework) 1.0
This article was previously published under Q331959 SYMPTOMSWhen you try to change the margins of the body of an ASP.NET
page by using a STYLE tag or a style sheet (.css), the border size of the
server side controls changes.
As a result, when you view the ASP.NET page in your browser, the relative
position between HTML controls and server
side controls changes. Also, when you try to resize the control in Design view,
the size of the control increases unexpectedly. However, this behavior does not
occur for HTML controls.WORKAROUND To work around this problem, use the properties of the BODY
tag (such as topmargin and leftmargin), instead of using the style sheet to change the margins of the
body. For example, to create a top margin of 10 pixels (px) in an ASP.NET page,
do not use the following STYLE tag:
<STYLE TYPE="text/css"> BODY { MARGIN-TOP: 10px } </STYLE>
Use the topmargin property of the following BODY tag:
<BODY topmargin= 10>
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 1/21/2004 |
---|
Keywords: | kblayout kbWebForms kbhtml kbDesigner kbControl kbbug KB331959 kbAudDeveloper |
---|
|