How do I make my web page stretch to fit all browsers?

Written by scott stanchak
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How do I make my web page stretch to fit all browsers?
Set the table width to 100% to fit the screen. (website layout image by 6922 Designer from Fotolia.com)

No Internet browser is alike. While you may prefer Mozilla Firefox, your co-worker could be a fan of Internet Explorer. That can be a nuisance for web developers who want their designs to display identically within each browser. Don't fret. There is a way to make a web page adjust to each screen size so that it fits each browser.

Skill level:
Easy

Other People Are Reading

Things you need

  • HTML editor

Show MoreHide

Instructions

  1. 1

    Launch your HTML editor. If you don't have this type of software, use TextEdit (Mac) or Notepad (PC). Both of these programs are already installed on Apple- or Windows-based operating systems.

  2. 2

    Select "File" and "Open" from the program's navigation menu. Locate your web page document and select it. If you don't have a document already created, select "File," then "New" instead.

  3. 3

    Build a table within the page's <body></body> tags. Set the table border to "0", align to "center" and the height and width to "100%". Setting the height and width at 100% allows the table to expand or contract depending on the browser size.

    Example:

    <body>

    <table border="0" align="center" width="100%" height="100%">

    </table>

    </body>

  4. 4

    Place your content within the table tags.

    Example:

    <body>

    <table border="0" align="center" width="100%" height="100%">

    Content here

    </table>

    </body>

  5. 5

    Select "File" and "Save" from the program's navigation menu. Upload the file to your Web server.

  6. 6

    Launch your Web browser. View the HTML document you just uploaded. Make sure the content now stretches to fit the screen. If you have multiple browsers, repeat this step to ensure consistency.

Tips and warnings

  • According to W3Schools.com, Mozilla Firefox is the most popular browser, followed by Google Chrome and Internet Explorer 8 (July 2010).

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.