HTML - Problems With Colspan In A Simple Table And Css
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 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! 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. 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. 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... 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 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> Hi guys, Ok I have 2 problems, one I'm sure is really simple but my brain is dead. The other might not be so easy. First off I have a webpage, that has a table in it. Within one of the cells are a series of small images (150x112pix). All I want to do is make that cell have a scrollbar so that users can scroll through the images. Nice & simple but for some reason I can't get the damn thing to work. (certainly not in Firefox anyway) I've set the cell widths, the table widths, I've enabled no wrap, everything I can think of. But each time it just blows the table formatting out. I've played with CSS & even iframes but nothing will work within the cell of the existing table. The second is a question to scratch a itch I've always had. Is it possible to use a bit of script that changes a image for another on a certain date? For example, to save one having to add some snow at christmas, you could have a pre-made logo with abit of the white stuff on, then come the set date it automatically loads that image instead of the orignial & then after a set date (say a week after new year) it reverts back to the original. Cheers folks. Hi Everyone i love this forum already Anyway, if someone could have a look at my basic site and see where i have gone wrong that would be fantastic. I have 3 niggles with a template im doing.I may redo the whole template now ive learnt as i think there maybe some stray code and/or ile convert it to css now im learning about div's ... anyway... the domain is... http://www.idealintexpools.co.uk/ (ignore the domain name - isnt staying there) 1. The main one is the white gap at the bottom of the fading image (IE) I spent about 2 hours trying to get rid of it and i bet its so simply 2. On firefox, there are huge gaps 3. The whole page slips off the side of the page slightly As i mentioned, because i have been fiddling i may need to redo it all from scratch but if anyone could at least give some pointers, ile be in your debt Cheers everyone Rob This is a table related issue. Is it possible to have one long row for your first row and then have 2 small columns on the 2nd row? I tried
Code: <table border="1" align=center cellspacing="1"> <tr><td background="./images/topbanner.gif" width="512" height="22"></td></tr> <tr><td bgcolor="#0099FF" width="22" height="22"></td><td> </td></tr> </table> And that didn't appear to work..it makes another column on the first row.. Hi, I'm being outsourced to turn an image into a website and I've been jumping through hoops all night trying to create a simple drop-down menu... Obviously it's not going well. All I want is that it is no more than 20px high, black no borders, white Arial Black or Verdana 10px all caps BOLD font, text mouseover to #fbb03b.. drop-downs that have a dark grey border on the bottom only (no other sides should have borders) and mouseover to #fbb03b for each link (same text formatting as base menu). This is becoming incredibly difficult for me, and things just keep going wrong. I'm using Adobe DreamWeaver CS4. This project is due in 12 hours, and I haven't slept, so I'm not exactly in for a learning experience right now, I just need immediate and effective help. Please help if you can. Thanks very much. This page works correctly in Firefox and Chrome, but not IE. What can I do to fix it? Many thanks. http://pivotanimator.net/faq.html i've got a little problem with an html table (sorry if i bothered you by adding colors to the table rows) Quote: <table border="1" width="900px" align="center"> <tr> <td bgcolor="#e6e6e6"> </td> </tr> <tr> <td bgcolor="#d2d2d2" width="900px" height="15px"> </td> </tr> <tr> <td bgcolor="#ff0000" width="900px" height="130px"> </td> </tr> <tr> <td bgcolor="#0024bf" width="900px" height="25px"> </td> </tr> <tr> <td bgcolor="#339df6" width="200px" height="340px"> </td> <td bgcolor="#ffcc00" width="700px" height="340px"> </td> </tr> <tr> <td bgcolor="#d2d2d2" width="900px" height="30px"> </td> </tr> </table> the table should look like this Basically I'm in the process of creating a website and things aren't going down so well on the coding front. http://blazeshare.net/ (temp URL) As you can see part of the table becomes stretched or w/e. I am in a rush so I've just used Dreamweaver and can't think for the life of me why its doing this. I tried valign on like every row/column in the damn code in another version to no avail, might have something to do with the way I sliced it. Been a while since I've attempted something like this so I'm a bit stuck. table code : http://blazeshare.net/nbdistro.txt As I said, messy coding because rushed using dreamweaver to make things easy. But apparently not.. lol. Anyone know the reason for this? I am making a table layout and am having a problem. There are two pictures enclosed.. one is how is should look (minus text) and the other is how it shows up in InternetExplorer Table Code: <body text=#FFFFFF LINK=#FFFFFF ALINK=#FFFFFF VLINK=#FFFFFF> <table width="770" valign="top" border="0" cellpadding="0" cellspacing="0" align="center" alt=""> <tr> <td colspan="4"> <img src="images/header_01.png" width="770" height="185" alt=""></td> </tr> <tr> <td colspan="2" valign="left" width="446" height="71" alt="" style="background: url('images/header_02.png') no-repeat; padding-top: 0px; padding-left: 446px; padding-right: 0px; padding-bottom: 0px;"> </td> <td colspan="2" valign="right" width="324" height="71" alt="" style="background: url('images/header_03.png') no-repeat; padding-top: 12px; padding-left: 10px; padding-right: 535px; padding-bottom: 0px;"> <!---------------------------------News-----------------------------------> <p class="marquee"> <Marquee direction="left" scrollamount="2" scrolldelay="50"> News at 11! </Marquee></p> <!---------------------------------News-----------------------------------> <td> <tr> <td width="229" colspan="1" valign="top" alt="" style="background: url('images/header_04.png') repeat; padding-top: 0px; padding-left: 80px; padding-right: 225px; padding-bottom: 5px;"> <!---------------------------------Navigation------------------------------------> <p class="nav">Main</p> <p class="li"> = <a href="index.html">Home</a><br> </p> <!---------------------------------Navigation------------------------------------> </td> <td class="padding" colspan="2" valign="top" width="282" alt="" style="background: url('images/header_05.png') repeat; padding-top: 40px; padding-left: 3px; padding-right: 3px; padding-bottom: 5px;"> <!----------------------------------Content--------------------------------------> <center>*insert title*</center> <!----------------------------------Content--------------------------------------> </td> <td colspan="1" valign="top" width="257" height="21" alt="" style="background: url('images/header_06.png') repeat; padding-top: 8px; padding-left: 0px; padding-right: 0px; padding-bottom: 5px;"> <!------------------------------------Info---------------------------------------> <center>Hey!</center> <!------------------------------------Info---------------------------------------> </td> </tr> <tr> <td colspan="1" valign="top" width="770" height="118" alt="" style="background: url('images/header_07.png') no-repeat; padding-top: 50px; padding-left: -1px; padding-right: 0px; padding-bottom: 30px;"> <!-----------------------------------Credits---------------------------------------> <center> Site is Copyright © of Concord Cosplay Group 2007<br> Layout by Joel Watson </center> <!-----------------------------------Credits---------------------------------------> </td> </tr> </table> </body> For this page on my site: http://www.monkeygambling.com/new%20...ingindex.shtml I am having trouble with the borders on the central part. I have created an external css file with these commands table.border { border-top:1px outset "gray"; border-right:1px outset "gray"; border-bottom:1px outset "gray"; border-left:1px outset "gray"; } td.border { border-top:0px inset "gray"; border-right:1px inset "gray"; border-bottom:0px inset "gray"; border-left:1px inset "gray"; } I want a border with one px width like a normal table, but I don't want the cells to have horizontal borders where the <hr> are. I have got the table to have a border around it, but I want the double line with highlighted edges like in a normal table. If that makes sense could anyone help me? thanks Hi, and thanks in advance for those who have a look at this issue. As an amateur webmaster, this question may seem extremely simple, but after working on it a while I have not been able to make it work. What I have is a solid bar running down the left side of the page, and I only want it to take up 20% of the page, I would like to then create the main page contents to the right of that bar taking up the remaining 80% with a white background. I was able to get the table set up for the side bar, but could not seem to start another one for the rest of the page. Like I said, this is an amateur speaking, so the answer may be very simple. Here is the html I have written so far: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <style href>a {text-decoration: none} </style> <title></title> <body bgcolor="#FFFFFF" text="#000000" link="#D8F0E3" vlink="#246B44" alink="#9ED9B8" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <style type="text/css"> body {text-align: left; } </style> <table width="20%" border="0" cellspacing="0" cellpadding="10" height="3" bgcolor="#006699"> <td align="center" valign="middle"> <font face="Verdana" size="4" color="#FFFFFF">Round Table Quotes Association <br> <style type="text/css"> body {text-align: left; } </style> </head> <br> <font face="Verdana" size="2"><a href="about.html" target="_blank">About</a><br><br> <font face="Verdana" size="2"><a href="cv.html" target="_blank">Authors Index</a><br><br> <font face="Verdana" size="2"><a href="submit.html" target="_blank">Submissions</a><br><br> <font face="Verdana" size="3" color="#FFFFFF">Table of Contents<br><br></font> Can someone tell me the code I will need to created the field to the right of the bar which will be inline with the bar and its contents, but filling up the remainder 80% of the page? Thanks so much, htmldad I am building an adwords landing page. The URL is he http://www.amanochocolate.com/adwords/dark-chocolate If you notice, I have put a text block on the right that is all black. I wanted it to have rounded corners so I used some graphics to achieve that. However, for some reason, the table cell color is showing up around the border even though I have no borders set for the table. (I.,e., border:0pt) Also, the border I don't want on the bottom is thicker for some odd reason. I've seen this before but have never figured out what causes this. I would simply like my table borders to be really clean (and gone). Any ideas? -Art Hi Guys: I am editing a html page for my boss but am having problems with the images stacking instead of being properly aligned. I can't figure it out for the life of me: http://www.nyu.edu/fas/dept/chemistr.../testpage.html Can anyone provide any advice on how to fix this? I am editing this page with Adobe Golive. Thanks! I am trying out a couple of layouts for presenting some information in table format. Basically, two tables side by side. Table 1: 3 rows, one column fixed width. table 2: A calendar format with 3 rows. In FF they are displayed as I want them. Even if I include an overflow to force a horizontal scrollbar. Ok I know. But if horizontal scrollbars are not desired, then why do we have them? In IE the overflow is totally ignored. Should I happen to have in table 1, a 4th line of text, then the <hr> I use as a seperator, shows up floating beside table 1, not underneath it as it should. Easily fixed with a <br> but I feel that should not be necessary. In IE, A horizontal scroll bar is not displayed until the data is forced way beyond the edge unlike in FF. Then table 2 drops below table 1 which is not where I want it. In another format, I simply place table 2 under table 1. Which is ok but just doesn't look right. Anyone have a site that discusses this problem and how to work around it so that the browsers are satisfied and the tables show as I want? |