Web Hosting Talk







View Full Version : formating website to browser size


safari
11-04-2007, 01:29 AM
hello,
can anyone help me figure out how i can stretch my pages to fit any browser in full?other than having a fixed table size?..thanks!

Jatinder
11-04-2007, 01:37 AM
Having a fixed width table won't do what you are after. You will have to set the table width to 100% to allow the table to expand to fill the browser width.

I wouldn't recommend tables for layout. Use <div> tag instead and use CSS to set the width to 100%.

azizny
11-04-2007, 01:57 PM
You could use Javascript to figure the screen size and redirect to the appropriate page/variables.

But that won't work unless Javascript is enabled (90% of times).

Peace,

mtgm
11-05-2007, 07:53 PM
If you're using tables, specify your widths in percentages:

<table width=100%>

not pixels:

<table width=800>

You are better off using CSS to do this, however.

binu497
11-06-2007, 12:45 AM
Hi,
For formatting websites to fit the browser size we can perform many techniques. we can use javascript,css,or set the width in percentage instead of a fixed width.
There are javascript codes that contains scripts that can detect the screen resolution and can redirect the user to the page that is optimized for their particular resolution.

Centered table with fixed width: Many Web sites that use tables for layout set the table width to a fixed number of pixels to eliminate horizontal scrolling at lower screen resolutions. A page optimized for 800x600 should have a maximum width of about 760 pixels.

Now remember that someone viewing the page at a higher resolution will see a lot of empty space. The page may display more attractively if you center the table and give the page a complimentary background color.

Percentage table width : when you are specifying the table width give it in percentage instead of a fixed value.
Also test the page in different browsers for compatibility.
Hope this will help..

Katasdf
11-30-2007, 08:34 PM
Yup, use percentages and not exact values