473,806 Members | 2,782 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

height="100%" in a table -- how to do it right?

Hi guys,

I'm using a height="100%" attribute in a <table> tag to get the
obvious effect (a table which fills the entire available
space). html-tidy, however, complains that this is proprietary,
i.e. not officially supported (in Opera it looks good though). Is
there an accepted way of accomplishing this?

Thanks,
**Daniel

--
"With me is nothing wrong! And with you?" (from r.a.m.p)
Jul 20 '05 #1
5 33661
Daniel Haude:
I'm using a height="100%" attribute in a <table> tag to get the
obvious effect (a table which fills the entire available
space). html-tidy, however, complains that this is proprietary,
i.e. not officially supported (in Opera it looks good though). Is
there an accepted way of accomplishing this?


Surely you've heard about CSS. That's the accepted way of doing most
anything that has to do with presentation of HTML. If you haven't
started learning CSS yet, start today.

In CSS (preferrably in an external file) you can write this:

table { height: 100%; }

--
Bertilo Wennergren <be******@gmx.n et> <http://www.bertilow.co m>

Jul 20 '05 #2
On Tue, 25 Nov 2003 17:07:21 +0100,
Bertilo Wennergren <be******@gmx.n et> wrote
in Msg. <bp************ *@news.t-online.com>
In CSS (preferrably in an external file) you can write this:

table { height: 100%; }


I can, and I did, but it didn't do anything (in Opera. I haven't
gotten around to testing with other browsers yet). That's why I
asked.

--Daniel

--
"With me is nothing wrong! And with you?" (from r.a.m.p)
Jul 20 '05 #3
Daniel Haude:
Bertilo Wennergren <be******@gmx.n et> wrote
In CSS (preferrably in an external file) you can write this:
table { height: 100%; }

I can, and I did, but it didn't do anything (in Opera. I haven't
gotten around to testing with other browsers yet). That's why I
asked.


It probaly does work, but not in the way you intended. The table
probably takes up 100% of the height _of its parent_. That parent is
probably the "body". But the body has probably just as much height as is
needed, which might not be the entire viewport. So you might need to set
100% height for "body" as well:

body { height: 100%; }

And if you're using XHTML you might need to set 100% height for the
parent of "body" as well:

html { height: 100%; }

Watch out for margin and padding. You might wind up making body or html
higher than the entire viewport. So add a few doses of "margin: 0" and
"padding: 0".

This is insidious stuff, and I'm not sure I understand everything about it.

--
Bertilo Wennergren <be******@gmx.n et> <http://www.bertilow.co m>

Jul 20 '05 #4
Bertilo Wennergren wrote:
Daniel Haude:
Bertilo Wennergren <be******@gmx.n et> wrote
In CSS (preferrably in an external file) you can write this:
table { height: 100%; }

I can, and I did, but it didn't do anything

It probaly does work, but not in the way you intended. The table
probably takes up 100% of the height _of its parent_.


Only if the parent has its height specified.
--
David Dorward http://dorward.me.uk/
Jul 20 '05 #5
On Tue, 25 Nov 2003 18:53:16 +0100,
Bertilo Wennergren <be******@gmx.n et> wrote
in Msg. <bq************ *@news.t-online.com>

(and others, too)

Thanks for the help, it works now.

--Daniel

--
"With me is nothing wrong! And with you?" (from r.a.m.p)
Jul 20 '05 #6

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

Similar topics

3
9280
by: davidkarlsson74 | last post by:
Error: document.getElementById("folderMenu").cells has no properties File: http://www.volkswagen.se/tillbehor/js/foldermenu.js Rad: 49 The function activates different DIV:s, but doesn't seem to work on FireFox or Netscape. What could be wrong? The function: function setActiveTab(tabNo) {
2
2219
by: TadPole | last post by:
Hi all, My main problems are::::::::: 1. Set a value within a block container that can be used and changed by subsequent templates/block-containers/tables etc.. 2. get/determine/find the setting that tell the process that the new top of the document region is now at the end of the last block-container used, this must be set in that last block container. 3. find the value used in the 'top" setting on the prior
20
4323
by: AndyZa | last post by:
Is the following html valid? <p><hr width="50%"></p> Or would the following be more "technically correct"? <p> <hr width="50%"> Do I require the closing </p> tag?
0
1376
by: jceddy | last post by:
Hi...I hope I am posting this in an appropriate place...if not, could some direct me to someplace better? Anyway, the problem I have is that I have a page with a table with two rows. The top row of the table holds some stylesheet-controlled buttons, and the bottom row contains an IFRAME which loads a framed page. The problem is that whenever I mouseover a button in the top row of the table, one of the frames in the bottom row is...
8
2010
by: vitay | last post by:
Hi Centered links are hidden by the footer in resolution 800x600 because divs have position absolute and I don't know how to prevent it. For IE I can change position by css "expresion" but Firefox don't support it. My page: http://exterior.pl/bumaga/
2
9170
by: kigerm | last post by:
Hey guys, Here is my problem. I have a page consisting of a table with one row and 2 cells. Inside the first cell is a table that serves as a table of contents. That table has several rows with one cell in each row. The cell in the last row is empty except for the background image in all of this table's cells. The other cells contain text from a database The second cell of the larger table contains a databound list. What I want is for...
16
4482
by: Tantale | last post by:
I used this serviec to check my webpage http://www.jmrw.com/Abroad/Barcelone/index.htm Made with Dreamweaver 8. The result is 206 errors, most of them "end tag omitted, but OMITTAG NO was specified.". I don't understand this result. Should I modify something ? Thanks
9
1812
Death Slaught
by: Death Slaught | last post by:
I'm working on a web site, and every thing is fine except when I added the navagation bar......for some reason it pushes my navagation bar away from the border, which is odd because there's no reason it should be doing this. Here's the code: <html> <head> <style type="text/css"> body {
3
4315
by: blackrunner | last post by:
ERROR in my Query?! ERROR: Element GESCHLECHT is undefined in FORM. i think everything ok. Maby somebody can help me here Element GESCHLECHT is undefined in FORM. The error occurred in \anmeldung2.cfm: line 404
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10371
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9192
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3852
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.