How to keep web page in the center of browser?

by Guest2491  |  11 years, 7 month(s) ago

0 LIKES UnLike

I am looking for the script to keep my web page in the center of the browser. Could you please tell me the center web page script for html.

 Tags: Browser, Center, page, Web



  1. Guest2762

    HTML code aligns web page elements to the top of browser window by default. This arrangement works very well for most of the pages and applications, where the content extends from top of the page and moves down below to the bottom of the browser window. However, some sites offer shorter blocks of content that lend themselves well to the vertical centering. Achieving this look requires the addition of six lines of HTML.

    Then you can Open your web page and can view its HTML. If you later edit your pages in a text editor, like WordPad or Notepad, you can open your page in the editor. If you use a clear visual editing program , like Adobe Dreamweaver or Microsoft FrontPage, you can open your page and change the display method to the "Code View." This shows you the HTML code that normally controls the look, feel and content of your page.

    After this add three table-related HTML tags. The easiest way to vertically center a page is to wrap the content on the page in the unformatted table, then you can apply vertical centering to the primary table cell. To add opening table tags, locate the tag near the beginning of the page code and insert the blank line directly below it. Then Copy and paste the code below onto this blank line:

    Later add three additional table-related HTML tags. Locate the body tag near the end of your code of the page and then insert a blank line which is directly above it. Copy and paste this code below onto the blank line:

    In the end save your web page and open it into your browser. Whether this browser window is tall or short, your content will now be vertically centered on the screen.


Sign In or Sign Up now to answser this question!

Question Stats

Latest activity: 11 years, 10 month(s) ago.
This question has 1 answers.


Share your knowledge and help people by answering questions.