Refresh always needed for 100% table width

C

C. David Rossen

Hello:

I have had this problem on many websites I have built and just cannot figure
out why it is doing this.

On a page whose main table is 100% in width, the table does not extend all
the way on the right. The browser has to be refreshed each time you go to
the page for it to extend all the way to the right and fill the screen. Does
anyone know why this happens and if there is a fix for this?

Any help would be appreciated. Thank you.

David
 
B

Beauregard T. Shagnasty

C. David Rossen said:
Hello:

I have had this problem on many websites I have built and just
cannot figure out why it is doing this.

On a page whose main table is 100% in width, the table does not
extend all the way on the right. The browser has to be refreshed
each time you go to the page for it to extend all the way to the
right and fill the screen. Does anyone know why this happens and if
there is a fix for this?

How about a URL or two where this occurs so we can see it?
 
B

Beauregard T. Shagnasty

C. David Rossen wrote:

[top-posting fixed]

First, I see no DOCTYPE, so browsers are in quirks mode. Add a Strict
doctype and see what happens.

http://www.w3.org/QA/2002/04/valid-dtd-list.html

Use HTML 4.01 Strict:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

Some browsers interpret margin and padding differently, so drop the
invalid <body topmargin="0" leftmargin="0"> and use CSS to set all
margin and padding to zero.

body { margin: 0, padding: 0 }

The rest is nested tables :-( and I don't want to try and
troubleshoot that. After you add the doctype, revisit here:
<http://validator.w3.org/check?verbose=1&uri=http://www.cdrmarketing.com/hm/>
 
C

C. David Rossen

bts-

Thanks very much. The margin style did the trick.

David


Beauregard T. Shagnasty said:
C. David Rossen wrote:

[top-posting fixed]

First, I see no DOCTYPE, so browsers are in quirks mode. Add a Strict
doctype and see what happens.

http://www.w3.org/QA/2002/04/valid-dtd-list.html

Use HTML 4.01 Strict:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

Some browsers interpret margin and padding differently, so drop the
invalid <body topmargin="0" leftmargin="0"> and use CSS to set all
margin and padding to zero.

body { margin: 0, padding: 0 }

The rest is nested tables :-( and I don't want to try and
troubleshoot that. After you add the doctype, revisit here:
<http://validator.w3.org/check?verbose=1&uri=http://www.cdrmarketing.com/h
m/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top