...

View Full Version : table width="100%"



pilsjart
12-12-2002, 02:30 AM
hello there...

Lets see... I have a html page were I want a table to occupy all the page width, so I write <table width="100%"... In a computer I run this page, using MSIE5, the vertical scrollbar didn't appear, and the table didn't occupied the entire page width, so there was a line with the background color of the page on the right side of the page.
If I write <table width="103%"... for instance, we resolve this problem, but then we have problems when the vertical scrollbar appears

Any ideas how to solve this?

krycek
12-12-2002, 02:54 AM
...that sounds odd. Are you sure that there is nothing else you are doing that might be influencing this behaviour...? In my experience, a table set to 100% should occupy 100%, regardless of the scrollbars (it should resize if they appear/disappear)

::] krycek [::

bacterozoid
12-12-2002, 03:25 AM
First of all:

<body topmargin="0" leftmargin="0">

That gets rid of any area around the edge of the page. Also:

margin:"0 0 0 0"

I believe that is the CSS format for getting rid of margins.

--

As for your scrollbars...if you set to 100 percent, that's how much space the table takes up...in my recent tests it disallowed scrollbars if all the content was within the table and cut any off that went too far.

krycek
12-12-2002, 03:31 AM
Originally posted by bacterozoid
margin:"0 0 0 0"

I believe that is the CSS format for getting rid of margins.


...surely you mean:

margin: 0;

OR

margin: 0 0 0 0;

OR

margin: 0px;

...or a different unit instead of px, however never ever in quotes :D

margin="0" is a valid HTML attribute but in CSS there are no quotes.

::] krycek [::

bacterozoid
12-12-2002, 03:37 AM
Hmm, I've ALWAYS used quotes in my css, though looking at W3 schools site I don't see any, lol. I guess my extensive HTML experience has carried over. I've never really liked not using quotes when you have a space within your attributes, doesn't look right...oh well, doesn't give me any errors, I'm happy. :thumbsup:

pilsjart
12-12-2002, 05:23 PM
well, I have already did margin=0 the HTML way and the CSS way.

The thing is that... The browser opens the window as a default withot the scrollbar, wich is something that I've never seen, and independently of the leftmargi, topmargin, widthmargin, heightmargin... there is a line in the righthand side of the page with the page's bakcground color.

krycek
12-12-2002, 05:26 PM
...can you link to the page, or post the source?

::] krycek [::

Nightfire
12-12-2002, 06:26 PM
<body style="overflow-y:hidden">



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum