Dirx Posted October 4, 2005 Share Posted October 4, 2005 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 comment Share on other sites More sharing options...
Jack McKalling Posted October 4, 2005 Share Posted October 4, 2005 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 Link to comment Share on other sites More sharing options...
ermac Posted October 10, 2005 Share Posted October 10, 2005 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 comment Share on other sites More sharing options...
Webworldx Posted October 10, 2005 Share Posted October 10, 2005 Should be able to fix it by just extending the parent element.. so:BODY { height: 100%; } Link to comment Share on other sites More sharing options...
Jonas Posted October 10, 2005 Share Posted October 10, 2005 divs are your friend... Link to comment Share on other sites More sharing options...
Jack McKalling Posted October 10, 2005 Share Posted October 10, 2005 And add </html> at the bottom Link to comment Share on other sites More sharing options...
ermac Posted October 10, 2005 Share Posted October 10, 2005 I hate divs and </html> tag was there but it wasnt workingnvm i've figured it out already thx anyway Link to comment Share on other sites More sharing options...
~Shinta Posted October 10, 2005 Share Posted October 10, 2005 I hate to be Mr. Evil, but tables aren't really meant for layouts as far as I know. Tables are used for tabular data not to place data in a page. Use css for that =). Link to comment Share on other sites More sharing options...
Jack McKalling Posted October 11, 2005 Share Posted October 11, 2005 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 comment Share on other sites More sharing options...
~Shinta Posted October 12, 2005 Share Posted October 12, 2005 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 comment Share on other sites More sharing options...
Jack McKalling Posted October 12, 2005 Share Posted October 12, 2005 THAT, is because you use HTML :)Xhtml is a recommend for that Link to comment Share on other sites More sharing options...
WiCkEdStYlZ` Posted October 12, 2005 Share Posted October 12, 2005 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 comment Share on other sites More sharing options...
~Shinta Posted October 12, 2005 Share Posted October 12, 2005 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 comment Share on other sites More sharing options...
Coolprogram Posted October 12, 2005 Share Posted October 12, 2005 You may want to put a </html> in there. Link to comment Share on other sites More sharing options...
Chocolate570 Posted October 12, 2005 Share Posted October 12, 2005 I hate divs and </html> tag was there but it wasnt workingnvm i've figured it out already thx anyway<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
WiCkEdStYlZ` Posted October 12, 2005 Share Posted October 12, 2005 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 comment Share on other sites More sharing options...
F-Man Posted October 13, 2005 Share Posted October 13, 2005 when ie7 is released and this is supported... then i will use 1.1 strict... until then xhtml 1.0 strict is for me <{POST_SNAPBACK}> 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 comment Share on other sites More sharing options...
WiCkEdStYlZ` Posted October 13, 2005 Share Posted October 13, 2005 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 comment Share on other sites More sharing options...
inChaos Posted February 16, 2006 Share Posted February 16, 2006 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 <{POST_SNAPBACK}> 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 comment Share on other sites More sharing options...
inChaos Posted February 16, 2006 Share Posted February 16, 2006 <!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 comment Share on other sites More sharing options...
inChaos Posted February 16, 2006 Share Posted February 16, 2006 sorry guys, i added height 100% to body and it works....perhaps should read more carreffully...and learn to write en english, of course:)see ya:) Link to comment Share on other sites More sharing options...
Dale Posted February 17, 2006 Share Posted February 17, 2006 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 comment Share on other sites More sharing options...
Dale Posted February 17, 2006 Share Posted February 17, 2006 Sorry i didnt read the you had figured it out peace lol! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now