Jump to content

Recommended Posts

I've got a really odd problem with my tables.I've got a table with two Columns, in the secound Column, i have another table with one cell.I've made that table's height 100% so that it will expand as i put things in to the First Column,but it dosn't go to 100% it just stays there.It's worked before, but it's not now, and i can't remeber what i did that made it stop working.sorry about not giving the code and all that, I am very paranoid about people stealing my ideas.EDIT: Never Mind...Got it to work...Oddly enough i just had to press enter a few times, and then Delete them... HTML, and CSS hate me.

Link to post
Share on other sites

I've got the same problem:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"><meta http-equiv="Content-Language" content="pl"><title>title</title><style type="text/css">table {	height: 100%;}td {	height: 100%;}</style></head><body><table border="1" width="100%">  <tr>    <td width="100%"> </td>  </tr></table></body>

when I remove:

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

it works fine but it connot be validated as html :)any sugestions?

Link to post
Share on other sites

Nonsens, tables are not only for tabular data. How could you ever think that? :DTables are good for putting blocklevel data next to eachother :yes:It can be done with stylesheets, but then ALL can be done like that! Using a table for querying blocklevel data on a line, still is structuring your document, which does not have to be done by CSS, that is only its style :)But we could have an endless discusion here, so we should leave it as is :( You are right, I'm right :)

Link to post
Share on other sites

Well I guess by w3c definition tables are used to arrange data... But they also say that they present a problem to non-visual media (like screen readers and braile I guess). The reason I switched a long time ago was because tables are complicated to edit so when you want to switch to a new layout it'll take a long time to edit every tag in the table code.

Link to post
Share on other sites

CSS layouts are much better to follow and edit than table layouts... but then tables are a much more effecient way of presenting data. so if you're making a page with say 200 people's contact details, tables would be a much better way of showing the information than div's... if you are making a page such as a forum (like this one) it's much better to use div's as you gain much more control over the layout of everything.

Link to post
Share on other sites

Also a div is more precise because the sidebar/content/copyright maybe/banner/left sidebar are all divisions of the page. I'm not saying tables should be killed forever, they should just be used for what they were originally intended to do. BTW I use XHTML (1.1) not html.

Link to post
Share on other sites

kk yea we are getting a little off topic here but i gotta say this...there is 1 thing stopping me use xhtml 1.1 and that is that ie (my most hated browser) doesn't support the application/xhtml media type... if i want to use application/xhtml i have to go xhtml 1.0 to do so, and even then i have to link to an external xsl file to get it working...when ie7 is released and this is supported... then i will use 1.1 strict... until then xhtml 1.0 strict is for me :)

Link to post
Share on other sites
when ie7 is released and this is supported... then i will use 1.1 strict... until then xhtml 1.0 strict is for me :)

IE7 will not support the application/xhtml+xml MIME type. Link.I personnaly use a PHP script to send the correct type to browsers that support it as XHTML 1.1 and text/htlm as XHTML 1.0 to browsers that don't. =)And about tables, Dan the Prof, what you said is like saying tables are not just for making tables. Of course they should ONLY be used for tabular data. A contact list like mentionned above could be made into a table. And the message boards like these ones here are tables and rightly so; just that they also need divs to render the best possible.
Link to post
Share on other sites

yea ok i forgot the MIME part off the end, heck its 1.30 am here im not surprised lolz, but yea... well at the moment i dont have a free php host without some form of banner ad or problem (except local apache server) so all i gots is html to work with for now... thats why i wont use ie either... i hate it :)

Link to post
Share on other sites
  • 4 months later...
Maybe it is that you thought the table wouldn't expand, but it did and that the cell was the one that didn't. You should add the 100% to the cell too, so it would fill its parent table :)

in the XHTML doctype i tried all to make element - <p>, or <div>, or table, or table cell with 100% heightit works, at the moment i change the doctype to html 4.01 for example....is it possible they simply do not have 100% height of the element in the xhtml?
Link to post
Share on other sites
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html><head><title>table-exp</title><style type="text/css"><!--body{margin:0px;}table{width:770px;height:100%;}.menu{width:200px;background:pink;height:100%;}.content{background:blue;height:100%;}.footer{background:red;height:20px;}--></style></head><body><table cellpadding="0" cellspacing="0" border="0"><tr><td class="menu">menu</td>       <td class="content">content</td></tr><tr><td colspan="2" class="footer">footer</td></tr></table></body></html>

************************next one is simular, but with div-s:************************

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html><head><title>div-exp</title><style type="text/css"><!--body{margin:0px;}.menu{width:200px;float:left;background:pink;height:100%;}.content{width:570px;float:left;background:blue;height:100%;}.footer{width:770px;clear:left;background:red;height:20px;}--></style></head><body><div class="menu">menu</div><div class="content">content</div><div class="footer">footer</div></body></html>

try this examples - it fits all the body ONLY if you remove the doctype tag, or if the doctype tag is for html...

Link to post
Share on other sites

Try adding height or Just erase it and re-add this!<TABLE BORDER="1" CELLSPACING="1" CELLPADDING="1" BGCOLOR="#000000"BORDERCOLOR="#2377BB" BORDERCOLORLIGHT="#0000FF" BORDERCOLORDARK="#0000FF"><th>BLANK</th><th>BLANK</th></tr><tr><td>BLANK</td><td>BLANK</td>then re-enter the table cell to remove the cell altogether put <TABLE BORDER="1"into <TABLE BORDER="0" the higher the number the thicker the lower the number the slimmer you can readd the table inside the table and just erase the border of the one inside!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...