★ wanayoo — archive 1999 http://webdeveloper.com/drweb/970512-drwebsite.htmlNouvelle recherche | Portail wanayoo

DR. WEBSITE

Setting Up Tables For Best Viewing, Regardless of Monitor Size

By Dr. Website

Dear Dr. Website®: I use tables a lot to line up images and text. I usually set the table for 100 percent and everything lines up fine on my 15-inch monitor in both Internet Explorer and Netscape Navigator. Should I be using pixel values--say, 600--so my alignment will be maintained when people look at my sites on 17-inch monitors? I don't have access to check them out on bigger monitors, and I want my alignment to stay the same as I designed it on my 15-inch monitor.

Donna Emmell

How your Web site's tables display to other users is really a function of how the table width is specified, not the size of users' monitors or even their monitors' screen resolution per se.

When you specify the width of a table as a fixed number of pixels, it should retain that width no matter how visitors to your pages resize their browser window. If a user's browser window is resized to a width narrower than a fixed-width table on your page, he or she will need to scroll across to see the entire table.

When you specify your table's width as a percentage, the table scales with the browser window. For example, you can set <TABLE WIDTH=75%> to make your table fill 75 percent of your screen's width.

You can test this by simply resizing the browser window on your own monitor. The table columns should scale based on how you've resized the browser window, but you should always be able to see the entire width of a table specified as a percentage without scrolling.There can be advantages to setting all your Web tables to a fixed width: It can set parameters for your site's design and development, and can be especially useful if you want to arrange a number of small graphics precisely. If you're worried that visitors to your site may not size their browser windows widely enough, though, you're better off specifying width for columns in your tables as percentages.

If you don't specify a width for your table, Web browsers will normally use a sophisticated algorithm to assess how wide the user's window is and how much material is in the table to set up an appropriate width. No matter how you set up your table's width, each table has a minimum size, calculated by the length of the longest single word or widest image in each cell.

Some useful online examples of Web tables with varying widths can be found at The HTML Station and The Table Sampler, a tutorial-by-example site maintained by Netscape. Dear Dr. Website®: Why do some URLs have an "80" in them and others have an "8080"? One search engine automatically added an "80" to our URL when we asked them to include it in their search listing.

John R. Sennett

The URL component you describe--the "80" in a URL like http://www.domain.com:80/file .html--is known as a port number. Normally an optional part of most URLs, ports are virtual addresses that allow several services to be run on the same physical machine.

The port number can usually be omitted, though, because the ports are standardized for particular Internet services. For example, a Web server usually takes HTTP requests on port :80, and gopher requests come in on port :70. It's only necessary to include the port number when entering a URL if the Web server uses a nonstandard port.

Most Web servers will let you specify a different port for requests, which users can then access from their browsers by specifying the optional port value in a URL. Ports other than 80 might be used for a number of reasons, such as for testing purposes. For example, to access a Web server running on www.somedomain.com, which accepts requests on port 8080, you would specify the URL http://www.somedomain.com:8080/.

If you were to set up and run your Web server on a port other than 80, you should select one numbered above 1024 in order to avoid conflicting with numbers reserved for standard Internet services.



Reprinted from Web Week, Volume 3, Issue 14, May 12, 1997 © internet.com Corporation All rights reserved. Keywords: site_management Date: 19970512

http://www.internet.com