HTML - Simple Example - Td Height Issue!!
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> Similar TutorialsIm 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? 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. 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! 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 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. Hello 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> 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, i tried looking through forums but couldnt find an answer. i hope u can please help! i have a photography ad up on a site that i use html for, its simply a block of code hosting a list/tall page of pics, one line/pic goes like this... <img src="http://img715.imageshack.us/img715/3126/img7899small.jpg"><br> the other lines in the text are the same code. problem is they all try to load up simultaneously causing a slow ad to see anything, potentially losing observers attention span. do u know if theres some code i can add to each line so each pic loads up fully before the next one begins to load and this starts at the top? this will help keep attention due to somin at the top loading straight away, thanks! Okay I have a table that has two rows and eight columns. I want to make a third row with only ONE column so that the third row is the length of the table. How do I go about doing that? This should be a pretty easy one, I think that I've just been staring at this for too long. The question is, why is the first row in this table so tall? I am expecting it to be around 400px tall, but it's about 950px. HTML Code: <html> <head> <style> table.container{ width: 1400px; } table.subcontainer{ border: 1px solid #000; text-align: center; width: 100%; } td.container{ background: #DDD; line-height: 4px; vertical-align: top; } </style> </head> <body> <table class="container"> <tr> <td class="container" rowspan="2" width="200"><table class="subcontainer"> <tr> <td height="1000">Toolbar<br />1000 x 200</td> </tr> </table></td> <td class="container" width="400" rowspan="2"><table class="subcontainer"> <tr> <td height="200">400 x 200</td> </tr> </table><br /> <table class="subcontainer"> <tr> <td height="400">400 x 400</td> </tr> </table><br /> <table class="subcontainer"> <tr> <td height="400">400 x 400</td> </tr> </table></td> <td class="container" colspan="2" width="800"><table class="subcontainer"> <tr> <td height="400">800 x 400</td> </tr> </table></td> </tr> <tr> <td class="container" width="400"><table class="subcontainer"> <tr> <td>400 x 200</td> </tr> </table></td> <td class="container" width="400"><table class="subcontainer"> <tr> <td>400 x 200</td> </tr> </table></td> </tr> </table> </body> </html> Hello World! (Where did that tradition start anyways?) Yes, I am fairly new at web design, and am using the method of "search-Google-whenever-you-have-a-problem-as-you-go" to learn HTML. I am pretty happy with the results I am getting in Dreamweaver, but there is one nagging thing that is throwing a kink into my designs. I have the majority of the content that is unique to each page within a table cell (<td>). Since I wanted to have the background color of the cell match exactly to an image that tops off the page body, I decided to have the background be one pixel of that color that repeats across the whole table cell. Originally, I just defined the background in the starting tag using "style=" then specifying the background. (Dreamweaver made sure I had it right using its Code Hinting). The background shows up perfectly when in the Dreamweaver editing view, but when looking at the page in any other view (Live view, preview in browser, etc.), the background of that cell is just white. I tried defining the background with a CSS ID, which has worked on other parts of the page, but no beans. What am I doing wrong? Is the fact it is only one pixel that has to repeat an issue? Here is the code: <td width="100%" height="103" colspan="8" align="center" id="page_background_beige" style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: solid; border-top-width: 1; border-bottom-style: none; border-bottom-width: medium;"> <!-- TemplateBeginEditable name="Body" --> //In here goes all of the content of the page <!-- TemplateEndEditable --></td> The CSS: #page_background_beige { background-image: url(Background_Pixel.png); background-repeat: repeat; } Thanks, Wookieguy (Heh, I know tables are a fairly sloppy way to do things, but this is a fairly simple site anyways.) I have a Very simple page laid out using <div>'s and at the bottom, IE6 is displaying some of my text (a text link) twice, and wrapping it to the next line? ANY help at all would be a life saver. http://www.jhilgert.com/em/index.html thanks in advance for any help. Hello HTMLforums.com community! I am doing some minor web design for an NPO (non-profit organization) in my community. There are some pages that exhibit this strange spacing between the headers and body as you will see on the following pages: http://www.gadshillcenter.org/progra...grams_main.php http://www.gadshillcenter.org/progra...enservices.php http://www.gadshillcenter.org/progra...connection.php This same thing happens with all other program_??.php pages. However, it does not happen on the following, seemingly identical templates: http://gadshillcenter.org/report/report_main.php http://gadshillcenter.org/newsevents...herreading.php http://gadshillcenter.org/newsevents...blications.php There doesn't seem to be borders on any of the pictures, so I see no reason for the indent that pushed the picture and top-left edge down one row. I use Microsoft Office Sharepoint Designer 2007. If you would like to view the code for any pages, just ask! Any ideas why? I could ENTIRELY reformat the pages, put them into tables and what-not, but that would take a while. Is there any way around this? Thank you all! Sincerely, Andrew hey forum. first timer here with what i think should be a simple fix...but i'm frustrated and out of patience. can anyone tell me why i can't get rid of the blank space above "bedrooms" in the left column here? http://jimbwayne.com/kdtest/interiordesign.html same issue with the middle column, actually. i'm stumped. any intel would be much appreciated. thanks in advance. jim Hi Everyone, I'm slightly confused by this one. But i'm sure theres a hack out there to fix it. Basically, in firefox and konqueror, running on kubuntu, the top navigation bar at http://www.tendervendors.com/dev/payroll.html displays correctly, and when you hover over it, it fills the li with a semi-opaque background. This is correct. Its done, by filling the a element, with a background-color and then applying opaque: 0.5; The a element also has padding, which makes it fill out to the size of the li element, so the a element fills its portion of the ul, and looks like the li has the affect applied to it. However, in opera, the right and left padding is correct, but the height padding doesn't work. Does anyone know of a bug in opera that would be causing this problem, and possibly a code fix for it? TIA Matthew Millar Hi all, This is my first post and its so simple that i am a bit embarrassed to post it, I have created a page with a flash video on it, but the only problem is cant workout how to centre the video, some help would be greatly appreciated, Here is the code, http://www.ogeetek.com/dave_test/test.txt And here is the website http://www.ogeetek.com/dave_test/test.html Thanks in advance, Hey. So I'm pretty good at stuff in general, my problem is that I do not have extensive experience with HTML/CSS so I don't know the best way to do this, or where to look for a way to do this. Basically, I want my layout to be like this: http://people.virginia.edu/~eee2a/Welcome.html in that I want there to be gray space on the side and a middle that scrolls. super simple right? I just don't know how to do it, and I don't know the best keywords to use on google for it. Thanks. okay so i have page, i want it to build itself to encompass at the minimum 100% of the browsers height dynamically i have seen a few methods of doing this via css and html and i have done it in the past without issue but now it wont do it anymore and im not sure why so the site is www.wiffleague.com/main.php (you may have to maximize browser to see what i mean) i want the footer section (at the bottom, the table with the copyright info in it) to always be bottom justified no matter the height of the rest of the page. currently what occurs is that if the page does not have enough content to fill the vertical height then it simply appends the footer section at the bottom of that and then a blank space under the footer. I have a div and within that my navigation menu. My menu is made up of ul with their styles removed and floated left to make the list horizontal. I'm trying to make the background colour of my div white, but it doesn't have any height so it's not showing up. |