HTML - Rowspan & Colspan Problems
I'm trying to create a table that looks like this:
Code: ============ || || || || || || ======= || || || || || ============ I use this code: Code: <table border='1'> <tr> <td>Text</td> <td rowspan='2'>&nbsp;</td> </tr> <tr> <td colspan='2'>Text</td> </tr> </table> But it comes out looking like this: Code: ============ || || || || || || =======----- || | || || | || ============ with 2 of the lines continuing. I can't seem to get it like the first picture. Any help is appreciated. Similar TutorialsHope someone can help with this. I think I have a colspan problem, though I'm not entirely sure. Here's what is happening -> websiteproblem.jpg Here's the code for what is happening -> websiteproblemhtml.jpg And would anyone know why I am not able to post text over my background image (images/OHDGwebsitebanner7_06.jpg)?? Would this be easier to do in Macromedia Dreamweaver? Thanks for all of your help! Hi, I'm really new to HTML and CSS, but I'm trying to teach myself. Maybe you can help with this problem: I have a table on my homepage that contains 3 columns. I want the first column to have multiple rows (each at 75px high), but I want the 2nd and 3rd column to only have 1 row, and have variable height. I used a colspan tag in the HTML, which seemed to work, in Safari. But I'd like it to look the same in all browsers. In Safari, my first column, top cell, is displayed at the top of the table. And in Firefox and Chrome, that first cell is displayed at the bottom of the table. How can I get the cells to start at the top of the table (each 75 px high) and build from the top-down. For example, This is a screen-shot of what I'd like to have in all browsers: http://toddk.org/table-css-help.png Here is my site: http://toddandjill.com/ CSS: http://toddandjill.com/tkstyles.css These are the CSS properties for my table (also in the CSS file above): HTML Code: .home-table { margin: 20px auto 0px auto; border-spacing: 8px 0px; } .home-table .row1 { width: 316px; height: 0px; NOborder: 3px dotted; vertical-align: text-top; } .home-table .row2 { width: 316px; height: 75px; border-bottom: 2px dotted #c1c1c1; vertical-align: text-top; } Any help would be greatly appreciated, thanks!! Todd i am supposed to make a resume in a table, so i have used this template and i can see how colspan works for width, but i cannot get rowspan to work: 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" xml:lang="en" lang="en"> <head> <title>HTML Practice Tables</title> <style type="text/css"> /* embedded style sheet */ .centerme{ text-align:center; } .format{ margin: 0 auto; width: 1000px; border: solid 3px #0000FF; } caption{ color: #003300 } .courses{ text-align:right; background-color:#CCCCCC; } th.days{ background-color:#99FF66; } .fullwidth{ width:100%; } </style> </head> <body> <div class="centerme"> <table class="format" cellspecing="2" border="1"> <caption>Beandip</caption> <colgroup width="25%" class="courses"></colgroup> <colgroup width="75%" span="5"></colgroup> <thead> <th colspan ="6">top colspan</th> <tr> <!-- these go together on the samw line --> <th rowspan="10" class="courses">Education</th> <th scope="column" class="days">resume info for 1st column</th> </tr> <tfoot> <tr> <th colspan ="6">bottom colspan</th> </tr> </tfoot> </thead> <tr> <!-- this is for the rows going left to right --> <th scope="row" class="courses">Professional Experience</th> <td>my resume info here for 2nd column</td> </tr> <tr> <th scope="row" class="courses">Volunteer Experience</th> <td>volunteer info</td> </tr> <tr> <th scope="row" class="courses">References</th> <td colspan="5">references info</td> </tr> </table> </div> </body> </html> how can i get the side rows to span down? this is eventually what the resume layout will look like (only in tables): http://www.scribd.com/doc/27538087/S...e-Table-Format Here is my page. It is ok in IE. I want exactly as in IE. But in Firefox it is displaying the columns differently. In 2nd row the col2 (Actually 2 and 3 colspan) starting from 3rd column where it shud start from 2nd col (As in IE). (I cannt use fixed width). How to fix this. <!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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2" bgcolor="#999999"> cols 12</td> <td width="7%" bgcolor="#CCCCCC">col 3</td> <td width="10%">col 4</td> <td width="8%">col 5</td> <td width="8%">6</td> <td width="6%">7</td> <td width="6%">8</td> <td width="6%">9</td> <td width="6%">10</td> <td width="6%">11</td> <td width="7%">12</td> <td width="6%">13</td> <td width="8%">14</td> </tr> <tr> <td width="4%" bgcolor="#996666">col 1</td> <td colspan="2" bgcolor="#99CCFF">cols 23</td> <td>col 4</td> <td>col 5</td> <td>6</td> <td>7</td> <td>8</td> <td>9</td> <td>10</td> <td>11</td> <td>12</td> <td>13</td> <td>14</td> </tr> <tr> <td colspan="2" bgcolor="#999999">cols 12</td> <td bgcolor="#CCCCCC">col 3</td> <td>col 4</td> <td>col 5</td> <td>6</td> <td>7</td> <td>8</td> <td>9</td> <td>10</td> <td>11</td> <td>12</td> <td>13</td> <td>14</td> </tr> <tr> <td colspan="2" bgcolor="#999999">cols 12</td> <td bgcolor="#CCCCCC">col 3</td> <td>col 4</td> <td>col 5</td> <td>6</td> <td>7</td> <td>8</td> <td>9</td> <td>10</td> <td>11</td> <td>12</td> <td>13</td> <td>14</td> </tr> <tr> <td bgcolor="#996666" width="4%" >col1</td> <td colspan="13" bgcolor="#FFCCCC">cols 234567891011121314</td> </tr> </table> </body> </html> If I specify widths for all cols It is OK. Then If I give a value like 'fdgdfgdfgdfgdfgdfgdfgdfgdfgdfgdfgdfg' in first row in Col12 2nd row col1 width increasing. It shud be fixed. I hope u understand. Thanks in advance. Please help, I have taken my website from fireworks and exported it to Dreamweaver. In my editable html text area I can't change the H1 to a h2 tag with out the entire table changing due to colspan and rowspan automaticly being added by either fireworks or by dreamweaver. If I delete the colspan code the table collapes??? The tutorial I am following allows the instructor to change on his with ease. Firworks cs3 and dream cs3 Thanks you in advance. Yes im a begginner...lol There's something I want to do with a table but I can't quite figure it out. Here's a basic table for demonstration purposes: Code: <html> <body> <table> <thead> <tr> <th>Item Header</th> <th>Link Header</th> </tr> </thead> <tbody> <tr> <td>Item 1</td> <td> <a href="#">Link 1</a> <br /> <a href="#">Link 2</a> </td> </tr> </tbody> </table> </body> </html> Ultimately what I want to do is put each link (Link 1 and Link 2) in their own rows then make the whole content area clickable with "display: block;" and then have the background change color with a:hover... but I want each of those links to still be connected to "Item 1" so that if a user clicks "Item Header" to sort the column alphabetically, both links will remain connected to the Item 1 "master row" (if you will). Here's a really quick example of what I mean (done hastily in Gimp 2.6): (Note: The blue area is what would would happen once the link is highlighted with the mouse) I'm sure it's probably really simple and likely involves rowspan in someway, but I've tried a couple of things and just can't get it to do what I want. Any help would be appreciated. Ok i have this pretty much setup they way I want it but the text
Quote: Please enter the hours your establishment is open for business. is all bunched up. How do I have that text all show on a single line but keep my boxes and eveything else where it is? Here is a pic so you can see what im talking about... I was playing with the effect rowspan has on a table. I am including three sets of code. The first one is the original table. The second and third one are attempts to use rowspan. First of all I used table width = a percent so that the table would show on all monitors without using the scroll bar. In the second table coding, I added rowspan, I don't know why the next row moved up into that row. So, in the third table coding, I added an implicit colspan="13" because I wanted just 13 columns. 1. I am wondering whether one can use a table width as a percent and also use rowspan? 2. Why does the added rowspan force the next row up into that row? I'm not missing the </tr> tag so the next <tr> should start a new row. 3. Somehow I must be missing the details of using rowspan correctly. I can get around my problem by changing things but I want to understand the use of rowspan in tables. Thank you. Pabu Hi, The link is to my HTML that has 1 table showing what I am trying to do and 6 tables of related things that I CAN do -- but I can't get what I want. I am thinking it can't be done (why?). I searched, but didn't find anything. I hope the HTML makes my objective clear. Thanks, Dave http://dkcromley.inoutbox.com/table3x3.html Hi got this problem with rowspan in a table I'd like it too look like the picture, but can't can anyone help me This might be a very simple problem to fix but I am struggling to find a solution. Basically this is the code for my table: HTML Code: <table cellpadding="0px" border="0px" > <tr><td rowspan="6" width="290px" height="375px"><img width="286px" height="371px" src="test.png"></td> <tr><th>Title</th></tr> <td colspan="2" width="450px">Content 1 <td width="75px"><img width="75px" height="75px" src="test.png"> </td></tr> <td width="75px"><img width="75px" height="75px" src="test.png"> <td colspan="2" align="right" width="450px">Content 2 </td></tr> <td colspan="2" width="450px">Content 3 <td colspan="2" width="75px"><img width="75px" height="75px" src="test.png"> </td></tr> <td width="75px"><img width="75px" height="75px" src="test.png"> <td align="right" width="450px">Content 4 </td></tr> </table> Basically the problem I have, is I want the 'content 4' box to be the same as the 'content 2' box (Stretched to the full width of the table.). Does anyone know what I'm doing wrong, I'm sure it's really obvious. Any help will be greatly appreciated. Good afternoon! Where has the sun gone I'm freezing! Is it possible to have a table with rowspan with the text in the rowspan to read vertically (like taking an entire sentence after its been typed and rotating it 90ccw)? I need to accomplish a layout like this: Code: <table> <tr> <td colspan=2 rowspan=2>? by ?</td> <td width=7 height=7>7x7</td> </tr> <tr> <td height=7>?x7</td> </tr> <tr> <td height=7 width=7>7x7</td> <td height=7>?x7</td> <td height=7 width=7>7x7</td> </tr> </table> <!-- expected: _____________ | ? x ? |7x7| | |7x?| |7x7|?x7|7x7| actual (ie): __________________ | ? x ? |7x ?/2 | | |7x ?/2 | | ?/2 x7| ?/2 x7| 7x7 | --> Any idea how to overcome this ie oddity? Hi, New to this forum, so apologies if this has been answered before--couldn't find the solution anywhere. I'm working on a page (http://www.dinacheney.com/index.htm), and the rowspan effect is working well on FF. On IE, the chalkboard image gets cut off and the image doesn't line up properly. Is this just rowspan weirdness and I need to rewrite the page using divs or css? Or is there something simpler I can do? All advice is much appreciated!!! Thanks in advance! Ok, this is the strangest quirk I think I have seen in IE. It seems that when I combine a right-aligned TD with a UL in the following row in a TD with a colspan of "2", where the content of the right-aligned TD is a word with no spaces, IE goes into spasms. In Opera, Google Chrome, Firefox, and Safari, all is well. Yet in IE, right-padding seems to get automatically added to the right-aligned TD. If I either remove the UL, get rid of the first column in the first row, or break up the long word, it displays fine. Yet, if all those things remain in place, IE just doesn't seem to be able to get its act together. Anyone? Here is my code: HTML Code: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <head> <title>Stupid IE</title> <style type="text/css"> td{ font-family:Garamond; } table.Experience{ width:635px; margin-bottom:14px; margin-left:auto; margin-right:auto; margin-top:40px; } tr.expHeader{ font-weight:bold; font-size:10pt; } td.expDate{ width:130px; } td.expCo{ width:205px; } td.expLoc{ text-align:right; width:505px; } td.expList{ font-size:11pt; text-align:justify; } td.expList ul{ margin-top:3px; list-style-type:square; margin-bottom:6px; } td.expList ul li{ margin-bottom:2px; } </style> </head> <body> <table class="Experience" cellpadding="0" cellspacing="0"> <tbody> <tr class="expHeader"> <td class="expDate">Here is a td</td> <td class="expLoc">Averyveryreallylonglongwordthatislonger</td> </tr> <tr> <td class="expList" colspan="2"> <ul> <li> This is a bullet item. Such as those that you may see in various lists around the world. The most famous bullet item, the semi-bollesque bullet field of 1997, gained notoriety for the fact that it was the first publicly known bullet item with the ability to break the sound barrier. </li> </ul> </td> </tr> </tbody> </table> <table class="Experience" cellpadding="0" cellspacing="0"> <tbody> <tr class="expHeader"> <td class="expDate">Here is a td</td> <td class="expLoc">This time I broke it up a little bit. See what happens?</td> </tr> <tr> <td class="expList" colspan="2"> <ul> <li> This is a bullet item. Such as those that you may see in various lists around the world. The most famous bullet item, the semi-bollesque bullet field of 1997, gained notoriety for the fact that it was the first publicly known bullet item with the ability to break the sound barrier. </li> </ul> </td> </tr> </tbody> </table> </body> </html> this is my page http://web.vtc.edu/users/cjb06271/CI...nal/order.html there are several things I would like to happen. 1. the right collumn background to be where the right collumn should be(so other links in navbar) 2.The test between the roach pictures to be alligned with the top rather than bottom of pictures (so smaller windows can see) 3. When you size the window smaller than the text, a scroll bar appears, and when you scroll the background no longer exists. If I put it on auto the background will only go as far as the text does. 4. (nice but not required)The cocroachs to be alligned to the left and right of the top bar respectively, and the text in the middle. 5. (nice but not required) the right column background image is being cut in half (as does the top one if you size small enough). any way to make the images ignore the collumns? don't worry about the colors I will be changing them soon Hi guys, now i know this is my first post here, i have joined because i am really stuck and i would really appreciate any help. First off, just so you know - i know near enough nothing about HTML I am busy designing my site and i cant go much further as there is one issue really bugging me. My website is vBulletin (yes i know its PHP) and im using another script called vBadvanced CMPS (a portal mosification). I have tried to add a navigation bar to the left of my forums and it works! Only problem is, it really breaks up the forum. Take a look for yourself Link Notice the way its all broken up at the bottom? Anyway, i posted my problem on both the vBulletin & vBadvanced websites without much luck. One of the admins told me that i needed to get some errors fixed (all 109 of them)... I managed to narrow the errors down to 67 all in all. Here I really am stuck guys and im sure these errors will be relatively easy to fix for someone who has experience with HTML/PHP. if anybody needs me to i can paste the vBulletin templates that are causing the problems Any help would be great. Thanks Hi everyone I hope some of you pros can help me out here? When you go to my site www.iMaciForums.com with IE 6 the text is all misaligned, I had the same problem with IE 7 & but I fixed that its just IE6 now. So could you take a look and let me know whats wrong with it, because it's driving me crazy Thanks. Can anyone suggest how i fix the problem i have here with IE? HTML Code: <body> <div id="container"> <div id="header"> <img src="images/thePlacePromotion.jpg" alt="The Place Promotion Agency for Gloucestershire" width="960" height="80" /> </div> <div id="middle"> <a href="http://www.glosfirst.co.uk"><img src="images/Middle.jpg" alt="We're building a new website, meanwhile here's a link to the current Gloucestershire First website." width="960" height="578" border="0" /></a> </div> <div id="bottom"> <a href="http://www.glosfirst.co.uk"><img src="images/slogan.jpg" alt="We're building a new website, meanwhile here's a link to the current Gloucestershire First website." width="960" height="80" border="0" /></a> </div> </div> </body> CSS is: Code: body { background-color: #96be3f; } #container { width: 970px; background-color: #96be3f; height:auto; margin: auto; } #header { width: 960px; padding: 20px auto; margin: auto; } #middle { width: 960px; height: 567px; margin: auto; } #bottom { width: 960px; height: 80px; margin: auto; } the top header on IE is over to the right! Thanks Hurley Hi The bit of coding below works fine in firefox and ie 5 and older it does not show right in ie 6 and 7 Please can someone tell me how to fix this bug. <td align="left" valign="top" bgcolor="#E7EEF5"><ul type="square" class="style2"> <li class="style3">Ground Training, starting and schooling young horses</li> <li class="style3">Re-schooling and corrective training to overcome behavioural and physical problems</li> <li class="style3">Rehabilitation following injury or illness</li> <li class="style3">Training for horse and rider at all levels and disciplines</li> <li class="style3">Re building confidence between horse and rider</li> <li class="style3">Re-training race horses</li> </ul> </td> <td align="left" valign="top" bgcolor="#E7EEF5"><ul type="square" class="style2"> <li class="style3">Competition preparation</li> <li class="style3">Advanced Equine Dental Technician</li> <li class="style3">Tellington Touch (TTeam) Groundwork and bodywork</li> <li class="style3">McTimoney Manipulation</li> <li class="style3">Equine Sports Therapy</li> <li class="style3">Massage, Stretching and Bodywork classes for horse owners</li> </ul> </td> |