HTML - Problem Rendering Table Cell Height In Ie
Hi all,
Having a bit of trouble with a table layout in IE. The following link renders correctly (or at least as I would like) in Firefox yet in IE the header and navigation bars are too think. I've tried adding a height attribute to all td's concerned, but to no avail. here's the link: http://www.events.ex.ac.uk/ivfdf2009...s/template.php any help you can offer muchly appreciated! Similar TutorialsHello, I've recently noticed that IE renders this table a bit differently than most browsers (Firefox, Opera, Safari, etc). The real page is much more complicated and uses proper styling, but I simplified it into the code below. The inline CSS sets the height of each individual cell and then the last cell is not provided with a height. I would love for the last cell to take the rest of the available height. I've tried many things to try and get this to work (like setting the height to 100%). The page renders how I expect it to in every browser I've tested except for the IE series. It seems as though Internet Explorer decides to ignore my row heights and calculate its own for some reason. Also, using a fixed height for the last cell is not possible due to how dynamic the web page is. Does anyone have any tips? HTML Code: <table style="table-layout:fixed;" border=1 width=100%> <tr> <td style="height:17px;width:150px;"> </td> <td style="height:600px" colspan=3 rowspan=5>This should span all of the rows and the remaining columns</td> </tr> <tr> <td style="height:17px;width:150px;"> </td> </tr> <tr> <td style="height:17px;width:150px;"> </td> </tr> <tr> <td style="height:17px;width:150px;"> </td> </tr> <tr> <td>This cell should take the rest of the available column height area</td> </tr> </table> Thank you. Hello, This is either a really easy question, or it just can't be done. I've tried it before, and could have sworn I've worked it out, but I can't do it again. I have a table with cells as below: What I want is Cell #2 to be Fixed and Cell #5 to be fixed in height. When Cell #3 expands, I only want Cell #4 to expand with it. So when #3 is 300px and #2 and #5 are 100px, then #4 should be 100px. But when if #3 expands to 400 px, then #2 and #5 should stay at 200px and #4 should expand to 200px. But this is not the case, atleast in IE. In Firefox, #2 and #5 stay how they are supposed to and #4 expands (yay!), but in IE, all three go haywire. I can't even find any consistancy in how IE determines which cell to expand and how much. I've created a test HTML file to see if I can get it working, and I still cannot. I have it available if anyone would like to see it and fiddle around with it. HTML Link (viewable): Table Test Zip File (includes html and ruler.gif Background): Table Test Zip As you can see, I have #2's height set to 100px and #5's height set to 50px. #4 has no height set. #3's is 300px. What I want is #4's then to be 150px (300 - 100 - 50 = 150). However, the case as it may be is that it just does not work out this way. How can I accomplish this. It must be possible. Note that the HTML contains CSS to determine the dimensions, but I have also tried it directly into the TD tags. I've also tried defining height directly in the TR and through a TR style as well as a ton of combinations of CSS postiioning and heights and floats and all kinds of stuff. I feel like I've tried everything. Any help appreciated. Thanks agin, Rege Hi, I have a template made that my friend made in photoshop and slice the image to be able to put them in html. The problem is when I put too much text the cell on both side of the middle one are resizing too. is there a way to lock them from resizing and get only the cell that i want to resize? I'll put the html code here and thx a lot! BTW When it say: this cell resize verticaly - it mean that I want this cell to resize and not the others Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>web_DIV</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> </head> <body bgcolor="#000000"> <table id="tableau_01" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td rowspan="4" width="50%" height="316" background="images/web_div_01.jpg"> </td> <td colspan="6" width="992" height="61" background="images/web_div_02.jpg"> </td> <td rowspan="4" width="50%" height="316" background="images/web_div_03.jpg"> </td> <td> <img src="images/spacer.gif" width="1" height="61" alt="" /></td> </tr> <tr> <td rowspan="3" width="55" height="255" background="images/web_div_04.jpg"> </td> <td rowspan="3" width="23" height="255" background="images/web_div_05.jpg"> </td> <td width="772" height="26" background="images/web_div_06.jpg"> </td> <td colspan="2" rowspan="3" width="21" height="255" background="images/web_div_07.jpg"> </td> <td width="121" height="26" background="images/web_div_08.jpg"> ></td> <td> <img src="images/spacer.gif" width="1" height="26" alt="" /></td> </tr> <tr> <td rowspan="4" width="772" height="435" background="images/web_div_09.jpg"> the text </td> <td width="121" height="4" background="images/web_div_10.jpg"> </td> <td> <img src="images/spacer.gif" width="1" height="4" alt="" /></td> </tr> <tr> <td width="121" height="225" background="images/web_div_11.jpg"> </td> <td> <img src="images/spacer.gif" width="1" height="225" alt="" /></td> </tr> <tr> <td width="50%" height="100%" background="images/web_div_12.jpg"> <p>this cell resize verticaly</p> </td> <td colspan="2" width="78" height="100%" background="images/web_div_13.jpg"> this cell resize verticaly</td> <td colspan="3" width="142" height="7" background="images/web_div_14.jpg"> this cell resize verticaly</td> <td width="50%" height="100%" background="images/web_div_15.jpg"> this cell resizeverticaly</td> <td> <img src="images/spacer.gif" width="1" height="7" alt="" /></td> </tr> <tr> <td rowspan="5" width="50%" height="345" background="images/web_div_16.jpg"> </td> <td colspan="2" rowspan="2" width="78" height="223" background="images/web_div_17.jpg"> </td> <td colspan="2" rowspan="2" width="21" height="223" background="images/web_div_18.jpg"> </td> <td rowspan="4" width="121" height="332" background="images/web_div_19.jpg"> </td> <td rowspan="5" width="8" height="345" background="images/web_div_20.jpg"> </td> <td> <img src="images/spacer.gif" width="1" height="199" alt="" /></td> </tr> <tr> <td width="772" height="24" background="images/web_div_21.jpg"> </td> <td> <img src="images/spacer.gif" width="1" height="24" alt="" /></td> </tr> <tr> <td colspan="5" width="871" height="81" background="images/web_div_22.jpg"> </td> <td> <img src="images/spacer.gif" width="1" height="81" alt="" /></td> </tr> <tr> <td colspan="2" width="78" height="28" background="images/web_div_23.jpg"> </td> <td colspan="2" width="773" height="28" background="images/web_div_24.jpg"> </td> <td width="20" height="28" background="images/web_div_25.jpg"> </td> <td> <img src="images/spacer.gif" width="1" height="28" alt="" /></td> </tr> <tr> <td colspan="6" width="992" height="13" background="images/web_div_26.jpg"> </td> <td> <img src="images/spacer.gif" width="1" height="13" alt="" /></td> </tr> <tr> <td> <img src="images/spacer.gif" width="8" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="55" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="23" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="772" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="1" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="20" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="121" height="1" alt="" /></td> <td> <img src="images/spacer.gif" width="8" height="1" alt="" /></td> <td></td> </tr> </table> </html> Hello all, I have the following table, however, my height seem to be changing: Code: <table width="100%"> <tr> <td height="50" width="50%"> CELL1</td> <td rowspan="3" valign="top" width="50%"> WRITING GOES HERE</td> </tr> <tr> <td height="50" width="50%"> CELL2</td> </tr> <tr> <td height="100%" width="50%"> CELL3</td> </tr> </table> I want cell1 and cell2 to always remain at 50px. cell3, may vary in size depending on how much information is entered into the 'WRITING GOES HERE' section. At present when there is a lot of wiriting in the 'WRITING GOES HERE', cell1 and cell2's height will be much larger that 50px. Any ideas how i can get cell1 and cell2 to remain constan and cell3's height to vary? Much Appreciated. Hello, I have a table more o less defined as follows: Code: <table border = 2> <tr><th colspan=2 align=center>GENERAL TABLE NAME</th></tr> <tr><th colspan=2 align = center>ANOTHER GENERAL NAME</th></tr> <tr><th>Col1</th><th>Col2</th></tr> <tr><td>Att1</td><td>Att2</td></tr> <tr><td colspan=2> <textarea cols=??? rows=???> <%=XMLString%=> </textarea></td> </tr> </table> I have the following problem: The table is shown but it needs to be printed... so I cannot use a textarea with scrolling option.... I need the textarea to be completely seen. What I need to write is a XML string... Is there a way of knowing the number of lines contained by this string (so I could put it in the rows parameter)? Another thing, I would like the textarea to completely fit within the 2 columns.... how can I do it? May be is there another way of doing it, without using textarea? Thanks for your help I have a very simple table that I cannot simply get to render correctly across IE, Firefox, and Opera. At first, I was using CSS to define the cell widths/heights - when that was giving me issues I got rid of all the CSS and attempted to use plain HTML. The problem persisted. Here's the code - it doesn't get much simpler than this: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> </HEAD> <BODY> <table cellspacing="0" cellpadding="0" border="1"> <tr> <td width="15" height="33">a</td> <td>b</td> <td>c</td> <td width="15" height="33">d</td> </tr> <tr> <td colspan="4" rowspan="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</td> </tr> </table> </BODY> </HTML> Appearance in Opera Appearance in IE7 Appearance in Firefox (this is what I want it to look like in all browsers) I haven't done HTML seriously in 7-8 years or so but I don't really remember having these problems with IE/Netscape. The fix I found for IE was to use style="table-layout: fixed" for the table: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> </HEAD> <BODY> <table cellspacing="0" cellpadding="0" border="1" style="table-layout: fixed"> <tr> <td width="15" height="33">a</td> <td>b</td> <td>c</td> <td width="15" height="33">d</td> </tr> <tr> <td colspan="4" rowspan="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</td> </tr> </table> </BODY> </HTML> Now IE works fine, Firefox didn't break, but Opera's cells still are not 15 pixels. IE7 Appearance fixed Here's my attempt at getting Opera to display it properly by mixing CSS and HTML: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> </HEAD> <BODY> <table cellspacing="0" cellpadding="0" border="1" style="table-layout: fixed"> <tr> <td style="width: 15px; height: 33px" width="15" height="33">a</td> <td style="height: 33px">b</td> <td style="height: 33px">c</td> <td style="width: 15px; height: 33px" width="15" height="33">d</td> </tr> <tr> <td style="width: 100%" width="100%" colspan="4" rowspan="1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</td> </tr> </table> </BODY> </HTML> Opera looks even worse now This seems like such a simple table. I really don't understand why I'm having such a hard time. I believe the second row - using colspan is causing the issue. Please don't answer with - "dont use tables" or something silly like that Thank you -TableTrTd Hi everyone: Any help appreciated. Objective: To have three equally sized and spaced images arranged horizontally, with their size set automatically by the size of the window. Development: I'm using a Mac, and I don't have ready access to a PC to experiment. What I tried: Code: <table> <tr> <td><img src = "a.png" style = "width: 100%" /></td> <td><img src = "b.png" style = "width: 100%" /></td> <td><img src = "c.png" style = "width: 100%" /></td> </tr> </table> <p class = "caption">A caption for the 3 images</p> <p class = "legend" >A legend for the three images</p> What happened: This works perfectly in Safari and Firefox (Mac) and Firefox under Vista, but in Internet Explorer under Vista , the images are HUGE - the unscaled size of the originals. What I think is the reason: IE is taking 100% to be relative to the width of the body element, not the td element. What I don't want to have to do: Use fixed sizes or calculate the sizes on the fly. What I'm trying now: removing the table and using a div, and inside that, setting the image width to 33% and floating one right and one left. What's the trick to get around this IE "gotcha" please? Thanks from a newbie. hi, i have a jsp page, in this page i am displaying data retrieved from mysql database. Now the problem is i must color table cell based on cell value. how to implement this.please give me an sample or working code foe this problem.( any code is accepted) preferably html or javascript. i.e if cell value is "late" then display that cell in red color else display the cell in green color please help me. Thanks ad Regards Akash 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 Greetings! Let me start this out by getting this out of the way - I know I should not be using tables for layout anymore But with this project I have good reasons as to not using them. Learning curve being one and time being another But I am headed that way! So here is the issue I have a simple layout and nested within is this little table for content and navigation Worked fine in FF, but IE7 is giving me some unexpected results with no explanation I can find. Here is the example page http://www.mountainroseherbs.com/test/blank.html Top left (blue) is the navigation image and cell - set height should be static and remain at the top Bottom Left (red) is a nav *footer*, I guess, but it remains at the bottom and the cell above it needs to be able to stretch indefinitely - with the images sitting on the bottom. Right (Orange) is the content area - dynamically stretching with the *red* following it. In FF this works great! Not so much in IE7 - in fact it skews the height of even the *blue* which is set!? Thanks so much in advance for your help on this, I am at my wits end! Nate~ On my website I have a left and a right menu, both columns have 3 cells with height set to 100% or just default no value. It all works fine in firefox and opera. However in Internet Explorer the bottom cell in both columns don't extend to meet the bottom of material in the cell above. It helps if you turn borders on in the code, but the betfred banner and mailing list items are valigned top, so should meet the bottom of the menu above in the cell above. Can anyone offer any help thanks 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? =/ Hi guy, i want to fix the height of the image in cell2 to the end of the cell.. any idea how can i achieve that..? thax heaps <html> <head> <title>hello</title> </head> <body > <table border="1" width="25%"> <tr> <td> cell1 </td> <td bgcolor="#F5BB1B"> cell2 <table bgcolor="black"> <tr> <td> cell4 </td> </tr> </table> <img src="c1.gif" align="right"/> </td> <td> cell3 cell3cell3cell3cell3 cell3cell3cell3 cell3cell3 cell3cell3cell3cell3 cell3cell3cell3 cell3cell3cell3cell3cell3cell3 cell3cell3cell3 cell3cell3cell3cell3cell3cell3 cell3cell3cell3 cell3cell3cell3cell3cell3cell3 cell3cell3cell3 cell3cell3</td> </tr> </table> </body> </html> The table itself is working fine, but the size of each cell is not correct in Firefox. Here is a screenshot of what is happening: http://img35.imageshack.us/img35/1938/tabletroubles.gif Here is the head of my page, the css for the table is he HTML Code: <style type="text/css"> #cat table {border:0px solid #333333; cell-padding:0; cell-spacing:0; align=center} #cat tr {align=center} #cat td {font-size: 13px; font-family=tahoma; font-weight: bold; padding: 0px; border:0px solid #333333; align=center;} #cat td a {text-decoration: none; color:#757575; background-color: white; display:block; height=23; background-image: url(linkbg1.gif); align=center;} #cat td a:hover {background-color: #333333; font-weight: bold; text-decoration: none;color: #ffffff; background-image: url(linkbg2.gif); align=center;} </style> and here is the table code, located in the body of the page: HTML Code: <div style="Height:53px; overflow:auto; width:900px; position:absolute; top:0; left:0"> <TABLE bgcolor=#333333 cellspacing=0; cellpadding=0;><tr><td> <div id="cat"> <table width=900; cellpadding:0px; cellspacing:0px> <tr align=center> <td width=20%> <font face=tahoma><a href="home.html">Home</a></font> </td> <td width=20%><center><font face=tahoma><a href="openings.html" target="_top">Openings</a></font></center></td> <td width=20%><center><font face=tahoma><a href="dance.html" target="_top">Dance</a></font></center></td> <td width=20%><center><font face=tahoma><a href="projects.html" target="_top">Projects</a></font></center></td> <td width=20%><center><font face=tahoma><a href="vocaloid.html" target="_top">Vocaloid</a></font></center></td> </tr> <tr> <td width=20%><center><font face=tahoma><a href="fanflashes.html" target="_top">Fanflashes</a></font></center></td> <td width=20%><center><font face=tahoma><a href="caramelldansen.html" target="_top">Caramelldansen</a></font></center></td> <td width=20%><center><font face=tahoma><a href="cosplay.html" target="_top">Cosplay</a></font></center></td> <td width=20%><center><font face=tahoma><a href="endings.html" target="_top">Endings</a></center></td> <td width=20%><center><font face=tahoma><a href="anime.html" target="_top">Anime Episodes</a></font></font></center></td> </tr> </table> </div> </td></tr></table> </div> A table is nested within another table. The table on the outside has no content, it is there to make a gray border around everything else. If you look at the table in firefox & internet explorer, you'll see that in IE- the table is much thicker than in firefox. How can i make it so that the table in Firefox will have the same thickness as the one in IE? I could really use some help. Thanks! Two of the cells seems to be rendering backwards. Why is that? I'm just getting started w/ html, browsing the Jalfrezi tutorial site for tables (see merging/combining cells), and found this odd example. Code: <TABLE BORDER=1> <TR> <TH ROWSPAN=2></TH> <TH COLSPAN=2>Rating</TH> </TR> <TR> <TH>Sad</TH> <TH>Cool</TH> </TR> <TR> <TH ROWSPAN=2>Artist</TH> <TD>Belle & Sebastian</TD> <TD>Michael Bolton</TD> </TR> <TR> <TD>Bentley Rhythm Ace</TD> <TD>Mariah Carey</TD> </TR> </TABLE> It renders sad/cool flipped. Shouldn't cool be to the left of sad because it is declared before it? Thanks. Anyone else come across problems with table rendering in firefox? It seems to happen with larger tables, say a table with 30+ cells for a calendar. Sometimes firefox will render extra cells and throw everything off. The code is fine, this will happen randomly in different locations. Sometimes a refresh will fix the issue, sometimes the refresh will just move the issue to another location. I've noticed that display:inline-table; fixes the problem for firefox, but in other browsers like opera display:inline-table; will get rid of margins (which I need). Anyone know anything about this? Hey all, I'm developing a site that is supposed to display a large table (something like 1500 rows x 50 columns). Firefox renders it just fine, but IE takes ~3:00 minutes to render it. I can't even display a timer during this time since the browser is frozen while rendering the table. I have tried a couple of solutions so far: 1. Using the "table-layout:fixed" style property. ( http://blogs.msdn.com/ie/archive/2005/02/10/370721.aspx ). This doesn't work (I mean it works, but it still takes the same time to load). 2. Using javascript to build the table dynamically (using insertRow() and insertCell()). I gave up after 10 minutes. I'm trying to avoid splitting it up to several pages with 20 rows each, as the client (and my boss) requested this will be the last resort. Any ideas? Hi everyone. So I got my template set up to the way I like it and everything is rolling good. I inserted a picture into one of the cells in the table and it shifts everything over. Here is my code: <td width="625" colspan="1" bgcolor="white"> <font type="Arial" size ="5" color="blue"> <b>Floorplan</b><br> <center> <a href="floorplanlarge.jpg"><img src="floorplansmall.jpg" border="0" /></a> </center> </td> I have been working on fixing this for the last hour and am out of ideas on what is going on. The picture is smaller than the cell width range. My picture width is 311 pixels and the cell width is 625 pixels. I dont know if there is code whether its HTML or CSS to prevent the cell from widening. Any help would be appreciated. Also if you need me to provide more detail I can. Thanks. I have an IE rendering problem. Does anyone know how I can fix it fast? I need to finish this damned thing by tomorrow and it doesnt look good. I have played with doctypes and css hacks and it doesnt seem to work . Here the page:- http://www.parentk12.com/wnp/index.html As you can see in FF its fine but in IE its a mess. I'd be grateful for any help or guidance. i want to open a frame by clicking on a cell,i can only do this when the ref is outside the table,can you help? Thanks everybody |