HTML - Table Height Issue
Hi,
First, please excuse me if this has been answered before. I wasn't able to find any similar posts that has a solution and thus I'm making this new thread. What I have is a simple table with two sections just like this: Code: <table> <tr> <td width='50%' valign='top'> Content goes here... </td> <td width='50%' valign='top'> Content 2 goes here... </td> </tr> </table> Inside those two sections I have a fieldset in each of them (yes, I know this might sound weird, but that's how I need it to be). The question is, how can I make the height of both <td> (or alternatively the fieldset value) to be equal, in a situation when the data is a dynamical one and I don't know its size initially. It looks ugly if one of the rows is longer than the other and I would like to justify them in some way. I tried setting height attribute but to no avail. Any thoughts how this can be achieved? Thank you in advance for your help! Similar TutorialsHello Gurus, I have a webpage with two tables in it. I need to have both table of same identical height(65px) however the issue is, that one table ends up being larger than other one. no matter what I try it does not stay at 65px height. Pleaes help. Below is the code snippet Thanks, Ruchir --------- <html xmlns="http://www.w3.org/1999/xhtml"> <!-- start page --> <div id="page"> <div id="pagebg"> <div id="content"> <div class="post"> <br></br> </div> <!-- start content --> <!-- DIV CONTENT --> <head> <style type="text/css"> /* Design by Free CSS Templates http://www.freecsstemplates.org Released for free under a Creative Commons Attribution 2.5 License */ body { /*background: #A17461 url(images/img01.jpg) repeat-x;*/ font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: #B1C0C7; } /*ol { list-style-position: inside; }*/ blockquote { border-left: 1px solid #9E9D89; } a { color: #FFFFFF; } a:hover { text-decoration: none; } /* Content */ .link:visited { font-family: Georgia,Arial,Verdana; vertical-align:top; color:rgb(0,82,82); text-align:auto; text-decoration:none; vertical-align: top; } .link:hover { font-family: Georgia, Arial,Verdana; vertical-align:top; color:rgb(0,148,231); text-align:auto; text-decoration:underline; vertical-align: top; } .link { font-family: Georgia, Arial,Verdana; vertical-align:top; color:Gray; text-align:auto; text-decoration:none; </style> <body> <div style="margin-left:0%"> <table style="margin-left:0%"> <tr> <td> <!--First Panel --> <div style="font-size:9pt;font-family:Georgia; color:Navy; width:290px; background-image:url(images/gray-gradient.gif); background-repeat:repeat;">label</div> <div> <table cellspacing="0" cellpadding="0" width="290px" height="65px" bgcolor="#fgfgfg" align="left"> <tr align ="left" width="290px" > <td align ="left"> <ul class="link" type="none" style="font-size:8pt;font-family:Arial;"> <li class="link"> <a style="font-size:8pt;font-family:Arial;" class="link" href="http://www.coexsys.com/erpoffering.html" id="l16">Offerings</a> </li> <li class="link"> <a style="font-size:8pt;font-family:Arial;" class="link" href="http://www.coexsys.com/id145.html" id="l18">Request More Information</a> </li> </ul> </ul> </td> <td align ="left"> <ul class="link" type="none" style="font-size:8pt;font-family:Arial;"> <li class="link"> <a style="font-size:8pt;font-family:Arial;" class="link" href="mailto:sales@coexsys.com" id="l17">Email us</a> </li> <li class="link"> <a style="font-size:8pt;font-family:Arial;" class="link" href="http://www.coexsys.com/id144.html" id="l18">Contact us</a> </li> </ul> </td> </tr> </table> </div> </td> <td> <!--2--> <div style="font-size:9pt;font-family:Georgia; color:Navy; width:290px; background-image:url(images/gray-gradient.gif); background-repeat:repeat;">label2</div> <div> <table cellspacing="0" cellpadding="15" width="290px" height="65px" bgcolor="#fgfgfg" align="left"> <tr align ="left" width="290px" > <td align ="left"> <ul class="link" type="none" style="font-size:8pt;font-family:Arial;"> <li class="link"> <a style="font-size:8pt;font-family:Arial;" class="link" href="http://www.coexsys.com/managedservices.html" id="l16">Offerings</a> </li> <li class="link"> <a style="font-size:8pt;font-family:Arial;" class="link" href="http://www.coexsys.com/rfims.html" id="l18">Request More Information</a> </li> </ul> </ul> </td> <td align ="left"> <ul class="link" type="none" style="font-size:8pt;font-family:Arial;"> <li class="link"> <a style="font-size:8pt;font-family:Arial;" class="link" href="mailto:sales@coexsys.com" id="l17">Email us</a> </li> <li class="link"> <a style="font-size:8pt;font-family:Arial;" class="link" href="http://www.coexsys.com/id144.html" id="l18">Contact us</a> </li> </ul> </td> </tr> </table> </div> </td> </tr> </table> <!--aaa--> </div> </head> </div> <!--content--> <!-- end content --> <!-- start sidebar --> <div style="clear: both;"> </div> </div> </div> <!-- end page --> <!-- start footer <!-- end footer --> </body> </html> I will be brief in hoping that the issue does not require a thesis to properly fix. I'm dealing with tables within tables..within tables. In one instance, I have a 2x1 (row by column) table inside another table. So, we'll call the inside table "B" and the outside table "A". Table B is centered inside a column in Table A. I'm trying to maximize the space, but nearly nothing works. Setting Table B height=100% does nothing. The only thing that works is setting the height=N px, where N is a number. This is no good, as I want to the site to work on all resolutions. I want it to be proportional. How can I fix this? Here's what I'm dealing with, visually: Any help would be welcome. Thanks. Im working on a website for my city City of Crescent Springs And im having an issue with the upcomming events div. i cannot get it to stretch to the footer Any help? OK so i have made this template and so far i like it but i have come accross a bit of an issue http://marlosweb.com/templates/test/contact.php OK so you see that little black bar on the left of the navigation? Well i want that to span the length of my page but 100% height wont work because CSS requires that the parent element has a fixed value. Does someone know how to cure this? Hi All, I have an iframe in my page. I change its height from a button inside the iframe using javascript. for example: parent.document.getElementById('iframe').style.height="100px"; The problem is that if the iframe height was 500px for example, and I changed it to 100px then the whole iframe is shrink down. I mean that the 100px are the top 100px but they are appear in the button of the iframe and there are 400px empty at the beginning. Any Idea how to change it? Thanks in advance I'm having a bit of trouble with an iframe. I'm wanting my iframe to automatically adjust to the height of whatever page loads into it. Is that possible? My code is as follows: HTML Code: <iframe src="test.html" name="_blank" width="656" height="100%"></iframe> I'm building all the page that should load in the iframe to be the proper width, but I was hoping to make the iframe automatically adjust to the height. Any help is greatly appreciated. I have a simple 2 column 2 row table that looks like the code below. I want to expand cell 2's height without expanding cell 1's height. I need this to be dynamic due to different users seeing different heights in cell 2. Cell 3's height can change all it wants to...I just dont want cell 1's height to change!! <html> <head> <title>Height Issue</title> </head> <body> <table> <tr> <td width="100px" height="100px"style="background-color: ##00FF00">cell 1</td> <td rowspan="2" width ="100px" height="200px"style="background-color: #00FFFF">Cell 2</td> </tr> <tr> <td width ="100px"height="100px"style="background-color: #FFFF00">Cell 3</td> </table> </body> </html> Hi guys I have a website that is driving me crazy with this problem. The layout and several pages have tables (I know i shouldn't be doing a table-based layout but my CSS skills aren't close enough to do what the site requires). The tables work fine w/o the DOCTYPE declaration which makes the browser work in Quirks Mode, but I don't want a site without the doctype of course. The problem is, when I use any kind of doctypes (and I've tried them all) my table cells go crazy. Check it out: Without doctype: http://smpt.comuf.com/index3.htm (correct view) With doctype: http://smpt.comuf.com/index2.htm (layout error) Another error: Normal: http://smpt.comuf.com/index3.htm?pagina=downloadr With doctype: http://smpt.comuf.com/index2.htm?pagina=downloadr. To make things simpler, I remade the menu part accordingly to the CSS rules and the height property in Dreamweaver 8 I even validated the page ( http://validator.w3.org/check?uri=ht...00=1;verbose=1 - 0 errors). In the editor, the page appears as follow: But when you see it in a browser, the problem still happens: http://smpt.comuf.com/indexe2.htm This is just because the doctype is present, but I made everything according to the rules, but still the same error... So, any ideas? =/ Please help me understand! I'm trying to create a page that has several static height table rows and one row that has an iframe that I want to expand to fill the height of the browser window. Here is a link to the test page: http://dl.dropbox.com/u/9536793/testWITHframe.html Here is the CSS used by the page: http://dl.dropbox.com/u/9536793/test.css Here is the page loaded into the iframe of the main page: http://dl.dropbox.com/u/9536793/testblankframe.html So, there are three rows at the top (Title, Menu, and Button rows). At the bottom are two rows (Bottom row and Copyright row). In the middle is the row that contains the iframe that I want to fill the page height. It works correctly in Firefox 4 and Chrome. However, in IE 9 (standards mode), the frame is too tall, so a scroll bar is added to the page and the bottom area is pushed off the end of the window. Bah IE!! If I take off the DOCTYPE, or use an older DOCTYPE, IE goes into Quirks mode, and then the page appears correctly (sort of). However, I'm trying to use HTML 5 rules, so I want to just use DOCTYPE html. I also need IE in Standards mode so that a charting tool that I am trying to use wiill work right. I just can't get all of the technologies to play together! Anyway, I know iframe are sometimes frowned upon, but we use a page layed out like this and then load various pages into the iframe based on what the user selects in the menu. I don't particularly like it either, but don't know a good alternative. (I'm open to suggestions for that as well). Any assistance with getting the height to fill the page (and no more) that will work in all IE (8 and 9 standards mode), FF, and Chrome would be appreciated. Thanks. I have a table row with a form with several buttons. The row is twice the height of the buttons and I haven't been able to control the height. Here is snippet: <html> <head> </head> <body> <center> <table border='1' cellpadding='0' cellspacing='0'> <tr> <td align='center'> <form> <input type='button' value='Prev month' id='btnPrevID' onClick='MonthYearChange("prev")'> <input type='button' value='Next month' id='btnNextID' onClick='MonthYearChange("next")'> <input type='button' value='Change Mo/Yr' id='btnChgID' onClick='DropDownChangeMonthYear()'> </form> </td> </tr> </table> </body> </html> Hi @ all! I am working on a layout with XHTML + CSS by use of a table, wich fills 100% of the browser window's height. Now here's my example: http://dennishoene.de.funpic.de/index2.html (Please just ignore the advt. popping up) I designed a simple grid for prospective contents. In Firefox, Safari and Opera it works fine, in IE not. I used fixed heights for the first line (30px), the second line (120px), the third line (30px) and the fifth line (30px). The fourth line should be variable (due to different screen resolutions), but in the end, the table should be of 100% height (see CSS-indications in <head>). It seems as the Internet Explorer simply does not take any notice of these values, whereas Firefox & the rest do (in detail: IE accepts the height: 100% statement, but ignores or deranges the fixed height values of the particular table cells/lines). How can I solve my problem? Any suggestions? Thanks in advance. Dennis Hello all, I am making a website with the lay-out based on a table (I know I shouldn't, when will I ever learn? ;-)). The problem is the following: I have divided my page into several blocks: The lowest <td> row has been set at 544px while the top row has been set at auto. Firefox gives the correct output. In IE the lowest row is longer than 544 px (the red line gives the height it should have, the red arrow points to the real hight). Putting the height on 100% doesn't help because it stretches the top row over the complete page, leaving the bottom row out of the screen (the positive side of this is that now the bottom row is 544 px as I had orderd it to)... So does anyone have advice for me (besides the fact that I should make my lay-out with div's: tried it, but it just doesnt work for me :-)). Thanks for the help, JuliusV ps. I've checked my code (html and css) with w3 and no errors have been found. Im having an issue with the table row heights on my page, i have three rows: The top row has the navigation menu, the second had a sub navigation menu (previous and next) to go between pages and then the third is has the content. I want the top to rows to snug up with the top of the table (like the top 25%) and then the content to be in the middle of the bottom row. Barring putting 'height="25%"' in the tr tag, is there a good way to do this? Thanks Hi, I am looking to get a table along the side of my page to stretch from top to bottom. I tried <table height="100%"> and .high {height:100%} ... <table class="high"> but it didn't work it only shows until the end of the table's content. Is there a way to do this? Thanks I'm using the following code to display a table with three columns. The first and third column each have a background image, so that these graphics will appear behind any text. The middle column does not have a background image. Instead, it has three images stacked on top of each other, whose combined height equal the height of the background images on the left and right (30+83+81=194). The table and three cells are given the same dimensions as their contents or background images. Code: <table border="0" cellpadding="0" cellspacing="0" width="584" height="194"> <tr> <td width="239" height="194" align="left" valign="middle" background="left.png"> START </td> <td width="117" height="194"> <img width="117" height="30" src="middle-top.png" border="0" /><br /> <img width="117" height="83" src="middle-middle.png" border="0" /><br /> <img width="117" height="81" src="middle-bottom.png" border="0" /> </td> <td width="228" height="194" align="right" valign="middle" background="right.png"> END </td> </tr> </table> In IE8 this seems to work fine, as it does in Firefox and Chrome. However, in IE7, I get this: You can see that the background begins to repeat at the bottom of the left and right columns, indicating that the table is higher than the dimension specified. Why is this? How can I fix it (without ruining the display in other browsers/versions)? Any suggestions much appreciated! Hello I have a very annoying problem: I have a table inside a td and I want the table the strech its height to the height of the <td> , but somehow I can't do it... <td valign="top" style="width:14px; border:solid 1px black;"> <table cellpadding="0" cellspacing="0" border="1" style="width:100%; height:100%; min-height:100%; max-height:100%" > <tr> <td class="CommonSeperetorUp" > </td> </tr> <tr> <td class="CommonSeperetorMiddle" > </td> </tr> <tr> <td class="CommonSeperetorDown" > </td> </tr> </table> </td> int the class "CommonSeperetorMiddle" I set the height to 100% ... anyone? Hi, My site is here I am having problems with the left side. It looks how I want it in Firefox but in IE it is ignoring my height commands and centering all the rows across the whole table. Anyone know how I can get this to look the same in Firefox and IE? Bit of a numpty so please be gentle Thanks Jon Hi Everyone: I'm having difficulty getting a table row height of "1" to display as only one pixel in height. Please see the attached files for reference. The JPG is what I want it to look like, and the index.txt file is the HTML I've currently setup that is not working. The table should have four white strips. On the right side, this is above and below the large black box, as well as under the green box. On the left side, this is between the light green box and the slightly darker green box. As you can see, all of these white strips appear to be larger than one pixel in height, and I'm not understanding why. Can anyone please explain to me why this is occurring, and what I can do to fix it? Also, once fixed, will I be able to merge cells of the same color (i.e make the big black box one merged cell, the below green box one merged cell, etc...)? Any help will be greatly appreciated. Thanks! Philip Hi, Please review the following code and give me your thoughts... HTML Code: <table width="500" border="1"><tr> <td width="200"><p>This</p><p>is</p><p>very</p><p>very</p><p>very</p><p>LONG</p><p>text</p></td> <td width="300" height ="100%" valign="top"> <table width="300" height ="100%" border="1" cellspacing="0"> <tr><td width="300" valign="top">This should be at the TOP</td></tr> <tr><td width="300" valign="bottom">This should be at the BOTTOM</td></tr> </table> </td> See the attachment for what I am trying to achieve... The thing to focus on is the second column and how it has 2 rows which are trying to stretch to fill the height of the single row first column. It works in Firefox 3.6 but not at all in IE8. Any ideas? And please don't talk me out of tables for this thread... I know they aren't the greatest thing ever, I'm just trying to fix what I have. Thanks! - Jeff I have just started using strict XHTML instead of HTML (because it makes my drop-down menus work in all browsers). But now all table rows that contain images using image tags are too high. Look here, where I have used background colors to show row heights: http://colatinaexit.com/index1.shtml This is a stripped-down page that I am using to try to figure this out. But I'm missing something (I just don't know what). Look at the rows under the main image. The first row has no image tag and a partial green background color. It uses a CSS class and a background image for the corner. The second row is identical. Notice that the heights are correct and they are aligned right next to each other vertically. Now look at the 3rd row. It contains several image tags and the partial blue background color shows that it is too high. It is defined as 10 high, all the images are defined as 10 high (and, in fact, they ARE 10 pixels high). Look at the 4th row (partial green background). No image tags, no CSS. and the height is right. The 5th row? Partial blue background color. It has an image tag, plus a CSS class that defines its height as 10px, and no background image. Too high overall. I've tried all the combinations I can think of. And every combination that includes an image tag is too high. Why? What am I missing? BTW, I know that I should be using only CSS and div tags, but I have an older version of Dreamweaver and it doesn't do WYSIWYG for CSS very well. So it would be really helpful for me to understand why table rows with images are overly high. Thanks, Paul |