We help IT Professionals succeed at work.

Page Offset between HTML page and ASP.Net page

Medium Priority
Last Modified: 2012-05-06
Hi Experts,

I have a series of HTMLpages with a menu bar across the top.
All the web pages had the menu bar in the same place.

I converted one of the pages to ASP.Net and while it is the same size, it is offset to the right by about 10 pixels compared to HTML pages.

I assume that this is due to the <Form> tag reuired by an ASP.Net page?

Is there a easy way round this?

Alternatively I could convert the other pages to ASP.Net


Watch Question

David H.H.LeeDigital Marketing (Hospitality)

Hi AndyCollinson,
Perhaps you can set the offset margin property inside <body> tag.
<body leftMargin="0" topMargin="0" marginwidth="0" marginheight="0">


Do you know the number of pixels that an ASP.Net <Form> tag inserts? Then I would know how many pixels to put as the offset into the HTML pages?

Alternatively, Is there an ASP.Net way of stopping this offset? Is it the <form> tag anyway?

As I said the other option is to change the other pages into ASP.Net - which would be just as easy...
Digital Marketing (Hospitality)
Hi AndyCollinson,
I'm not sure about the exact pixels that inserted in <form> tag. Perhaps you can use "JR Screen Ruler" to measure the design adjustment. Hope it helps.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Thanks xcom.
It was me being stupid!
There was an entry in the style section of the page overiding the external style sheet of the other pages.
Anyway problem solved.
Thanks anyway
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.