473,320 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

TABLE height CSS workaround

I want a table to be 100% as high as the viewable area of the page.
Well, of course, TABLE HEIGHT is no longer an attribute, so I did a
work around using STYLE="height:100%" and <BODY STYLE="height:100%">.
It works great in IE but in Netscape it takes height=100% too
literally and if the page is the slightest bit taller it just cuts it
off and doesn't expand like IE does. Does anyone know of a workaround
for this?

Thank you,
Angelus
Jul 20 '05 #1
7 33954

"Angelus" <An*****@aXpi.net> wrote in message
news:46**************************@posting.google.c om...
I want a table to be 100% as high as the viewable area of the page.
Well, of course, TABLE HEIGHT is no longer an attribute, so I did a
work around using STYLE="height:100%" and <BODY STYLE="height:100%">.
It works great in IE but in Netscape it takes height=100% too
literally and if the page is the slightest bit taller it just cuts it
off and doesn't expand like IE does. Does anyone know of a workaround
for this?


With a proper DTD and valid markup there is no way to do what you want.
--
Karl Core

Charles Sweeney says my sig is fine as it is.
Jul 20 '05 #2

"alex" <al*****@yahoo.com> wrote in message
news:4c**************************@posting.google.c om...
"EightNineThree" <ei************@REMOVEeightninethree.com> wrote in

message news:<bg**********@ngspool-d02.news.aol.com>...
"Angelus" <An*****@aXpi.net> wrote in message
news:46**************************@posting.google.c om...
I want a table to be 100% as high as the viewable area of the page.
Well, of course, TABLE HEIGHT is no longer an attribute, so I did a
work around using STYLE="height:100%" and <BODY STYLE="height:100%">.
It works great in IE but in Netscape it takes height=100% too
literally and if the page is the slightest bit taller it just cuts it
off and doesn't expand like IE does. Does anyone know of a workaround
for this?


With a proper DTD and valid markup there is no way to do what you want.


What do you mean? If the current specifications don't allow that they
have taken a step backwards in my opionion. It is common to have a
need for a table to populate the whole width and height on the
browser. In fact it is so common that i need to do that too and i
can't figure out how. I just posted a question few minutes ago before
i read this thread. I need to comply with HTML 4.01 transitional, and
even style="height:100%" for table doesn't work.
Why allow percentages for width but not for height? Doesn't make sense
to me.


Because tables are intended for tabular data and as such, their size will be
dictated by the content in the table's cells.
--
Karl Core

Charles Sweeney says my sig is fine as it is.
Jul 20 '05 #3
> Because tables are intended for tabular data and as such, their size will be
dictated by the content in the table's cells.


Ok, I guess I can understand that. But they are also widely used to
arrange things on the page. That might not be their intended use but
it was something that you could count on to work pretty much the same
across different browsers.

For example, if I need to create a page that needs to have header
always at the top and footer always at the bottom of browser's client
area, you could create a table with 100% width and height, have three
rows, and set the height of the middle row to 100%. That way no matter
how short the content in the middle is the footer will always be at
the bottom of the page.

How can I achieve the same effect with the new standard and also
ensure that it displays correctly with new and old browsers?

Alex
Jul 20 '05 #4

"Darin McGrew" <mc****@stanfordalumni.org> wrote in message
news:bg**********@blue.rahul.net...

Maybe. Maybe not. I regularly use a couple browsing environments where it
wouldn't. I can think of several more, including some where the concept of
"the bottom of the page" doesn't make sense the way you use it.
Sure.
There are several CSS-based examples of this kind of thing, including the
one at http://css.nu/exp/nf-illustration.html
That was interesting. However it didn't display nicely in IE. Accorning to
my webstats 95% of my visitors use IE... so I have to make sure it works the
best for IE.
No, it won't display the same in new and old browsers. But that's how the
web works: http://westciv.com/style_master/hous...oil/not_paper/ I enjoyed reading this paper. I agree with the author. I am ok with people
choosing font, size, color, etc.
But positions of the menus, that's something that should positioned at the
same place across browsers in my opinion at least. Thanks for the link!
"What is the use of running when you are not on the right road?"

Excercise, maybe? :)
Jul 20 '05 #5
On 1 Aug 2003 14:51:52 -0700, al*****@yahoo.com (alex) wrote:
"EightNineThree" <ei************@REMOVEeightninethree.com> wrote in message news:<bg**********@ngspool-d02.news.aol.com>...
"Angelus" <An*****@aXpi.net> wrote in message
news:46**************************@posting.google.c om...
> I want a table to be 100% as high as the viewable area of the page.
> Well, of course, TABLE HEIGHT is no longer an attribute, so I did a
> work around using STYLE="height:100%" and <BODY STYLE="height:100%">.
> It works great in IE but in Netscape it takes height=100% too
> literally and if the page is the slightest bit taller it just cuts it
> off and doesn't expand like IE does. Does anyone know of a workaround
> for this?
With a proper DTD and valid markup there is no way to do what you want.

What do you mean? If the current specifications don't allow that they
have taken a step backwards in my opionion. It is common to have a
need for a table to populate the whole width and height on the
browser.


What actually is the need? If someone has a very large window,
displaying a table with rather little content, why is it necessary for
the table to fill the window? The page background will fill the window
anyway, so if you choose an appropriate background, what is the problem?

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #6
Stephen Poley <sb*****@xs4all.nl> wrote in message news:<kj********************************@4ax.com>. ..

What actually is the need? If someone has a very large window,
displaying a table with rather little content, why is it necessary for
the table to fill the window? The page background will fill the window
anyway, so if you choose an appropriate background, what is the problem?


Here is one, and it assumes using tables for doing layout (I know
that's going to offend some people. I apologize.)

Links for copy right, privacy policy, site map, credits, etc. are
usually placed on the bottom of the page. For pages that have enough
content to fill the whole browser window that's not a problem. But for
pages that only have a paragraph or so, then the bottom links would
display at the middle of the browser window. So then as the user goes
from one page to another, the bottom links keep moving from the bottom
to middle of the page, without any consistency. Not good.

Alex
Jul 20 '05 #7
On 4 Aug 2003 06:29:19 -0700, al*****@yahoo.com (alex) wrote:
Stephen Poley <sb*****@xs4all.nl> wrote in message news:<kj********************************@4ax.com>. ..
What actually is the need? If someone has a very large window,
displaying a table with rather little content, why is it necessary for
the table to fill the window? The page background will fill the window
anyway, so if you choose an appropriate background, what is the problem?
Here is one, and it assumes using tables for doing layout (I know
that's going to offend some people. I apologize.)

Links for copy right, privacy policy, site map, credits, etc. are
usually placed on the bottom of the page. For pages that have enough
content to fill the whole browser window that's not a problem. But for
pages that only have a paragraph or so, then the bottom links would
display at the middle of the browser window. So then as the user goes
from one page to another, the bottom links keep moving from the bottom
to middle of the page, without any consistency. Not good.


Well, OK. A few thoughts:

- Having the bottom links appear at the bottom of the text each time
*is* consistent. It's just consistent in a different way to what you
currently have in mind.

- If you feel it important to have, say, a 'next' link at the same
position on the screen each time, so the reader can click through the
pages rapidly, then your method doesn't work either - if the text
doesn't all fit on the screen, the link will not initially be visible.
Best in this case is to use <LINK REL=... > or as second best, place the
links at the top of the page.

- But for links such as copyright etc, it's hard to see a need to keep
them at a specific screen location. The reader will probably click them
once at most.

- Having a lot of pages with only a paragraph or two suggests that the
site design isn't ideal to begin with. I know preferences differ
somewhat on this point, but I don't like sites with myriad tiny pages
(nor, in most cases, those with a handful of gigantic pages - it's a
question of striking a balance.)

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: §Þ¦w | last post by:
How can i get the table height by Javascript
9
by: john T | last post by:
Is there any way to input he screen.height information into <Table Height=> so I can have my page auto center vertically. I don't want to use CSS because it disrupts other tables.
9
by: alex | last post by:
Hi, It seems like HTML 4.01 Transitional spec. doesn't allow table height to be expressed in percents. When i have this doctype tag: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...
1
by: Derek Fountain | last post by:
I seem to recall from long ago that the TABLE HEIGHT attribute was deprecated (or was Netscape only, or something). Hmmm... I have a web page with a table which controls layout - one row with 3...
7
by: Arthur Dent | last post by:
I am completely baffled... i cannot for the life of me get the HEIGHT style to work on a table in the new 2005-supported XHTML. I put a HEIGHT: 100% on my table so that my footer row will also show...
0
by: Markus Olderdissen | last post by:
i want to create my page with 100% height. <table height="100%"works but is not correct by default. i saw various information how to do it with stylesheet. i really have problems to create my page....
2
by: JMT | last post by:
Hello, I get some dynamic controls (ASP .Net) inside a table, the height property of the table is variable according the controls loaded, so I need to know the final table height, this value...
1
by: maz77 | last post by:
How can I force a table to get an height of 100% with CSS? I'm using VisualStudio 2005. Thanks MAX
2
dlite922
by: dlite922 | last post by:
My site has multiple section each divided into tables (I'm using tables because the other developers slept through HTML 101) The section table must be a certain height and contains a header (th)...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.