Page Offset between HTML page and ASP.Net page

Posted on 2009-02-12
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


Question by:AndyCollinson
    LVL 29

    Expert Comment

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

    Author Comment

    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...
    LVL 29

    Accepted Solution

    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.

    Author Closing Comment

    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

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    A Change in PHP Behavior with Session Write Short Circuit ( (Winter 2014)** With the release of PHP 5.6 the session handler changed in a way that many think should be considered a bug.  See the note …
    New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
    Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
    Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now