HTML - Tables/columns/adding Cells
Hey everyone,
I have a music video website and on each genre page, I want to build a table to list each band along with a thumbnail image. I know how to do this, however, I can't figure out how to add a cell without completely throwing off the rest of the table. For example, if I alreay have a 3 column table with Aerosmith, Alice Cooper and Chris Isaak in those 3 cells in the first row but I want to add a Beck video (which would need to go between Alice Cooper and Chris Isaak alphabetically), it throws off the cells in that row and in all the other rows of the entire table. I thought about using 1 cell tables for each band but I can't get them to sit next to eachother, they will only stack one on top of the other. Can someone give me some advice or direction? Does that make sense? Similar TutorialsHello, just starting here I complete the HTML an CSS tutorials at http://www.w3schools.com/ I also downloaded a trial for coffeecup I am helping a local business with their website, it is very simple, just content and a couple of pictures. For some reason, as much as I google it up I cannot figure out how to add a left column to the site. the examples I find, even free templates from Amaya use tables. I dont want to use tables, I guess I need to use div? But if that is so, how do I position my column? It seems w3schools gave me a good start but I am having problems putting the concepts together. If you can direct me to the right answer, or recommend a book or tutorial that actually builds a simple site with a couple of columns in good design, I would really appreciate it. But I dont want to use tables as I learned it is not best practice Thank you! Hello, I am trying to make an html table that looks something like the following: This is the best I can come up with so far: Which was written using the following code: HTML Code: <table border="1" style="empty-cells: hide" FRAME=VOID> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td colspan="8" ALIGN=center>100614-c5-2_clm3-2x20_*.nrrd</td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td>3</td> <td>4</td> <td></td> <td>2</td> <td>3</td> <td>6</td> <td>7</td> <td>16</td> <td>11</td> <td>14</td> <td>15</td> <td> </td> <td>3</td> <td>4</td> <td>7</td> <td>8</td> </tr> <tr> <td NOWRAP><h7>100614-c5-2-redo-2x6_*.nrrd</h7></td> <td>2</td> <td>5</td> <td></td> <td>1</td> <td>4</td> <td>5</td> <td>8</td> <td>9</td> <td>12</td> <td>13</td> <td>9</td> <td> </td> <td>2</td> <td>5</td> <td>6</td> <td>9</td> <td NOWRAP><h7>100615-c5-2-clm4-2x15 *.nrrd</h7></td> </tr> <tr> <td></td> <td>1</td> <td>6</td> <td></td> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td>6</td> <td>7</td> <td>8</td> <td> </td> <td>1</td> </tr> <td> </td> <td> </td> <td> </td> <td> </td> <td colspan="8">100615-c5-2_redo2-2x6_*.nrrd</td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </table> I dont care about the individual bevel borders between each cell, those are fine. What Im really trying to do is add an additional black line border to certain "walls" within individual cells, similar to the vertical line that separates the 13 and the 9 in the image above... Any suggestions? (Also, how do I eliminate the borders in the cells that contain the file name?) Thanks ahead of time. Hi all, Happy NY Is there anyway to navigate links through tables and cells. I'd like to have some links on my page that change information (text only) within a specific cell or table without changing the page. Is this possible? I remember this being done in frames, but would rather not use frames if possible. Thanks. I have some nested tables (collapse/expand kinda table). How can I align the columns of each nested table, if all are expanded I want to see all the columns underneath symetrical. I have attached the screenshot of what I am getting with the following code: HTML Code: <head runat="server"> <title>Untitled Page</title> <style type="text/css"> .collapsed { display: none; } table#container { background-color:#FFFFFF; border: solid #000 3px; width: 400px; } table#container td { border: solid #000 1px; } table#sub { background-color:#FFFFFF; border: solid #000 0px; width: 400px; } table#sub td { border: solid #000 1px; } .toprow { font-style: italic; text-align: center; background-color: #FFFFCC; } .leftcol { font-weight: bold; text-align: left; width: 1%; background-color: #CCCCCC; } </style> <script language="javascript" type="text/javascript"> //***collapsible rows function outliner(evt) { evt = (evt) ? evt : (window.event) ? window.event : ""; var oMe; if (evt.srcElement) { oMe = evt.srcElement; } else if (evt.target) { oMe = evt.target; } if (evt.srcElement) { //for IE var child = document.all[oMe.getAttribute("child",false)]; } else { //for Firefox var child = document.all[oMe.getAttribute("child",false)]; } //get child element //if child element exists, expand or collapse it. if (null != child) child.className = child.className == "collapsed" ? "expanded" : "collapsed"; } function changepic(evt) { evt = (evt) ? evt : (window.event) ? window.event : ""; var uMe; if (evt.srcElement) { uMe = evt.srcElement; } else if (evt.target) { uMe = evt.target; } var check = uMe.src.toLowerCase(); if (check.lastIndexOf("expand.gif") != -1) { uMe.src = "images/collapse.gif"; } else { uMe.src = "images/expand.gif"; } } </script> </head> <body onclick="outliner(event)"> <table id="container" border="1"> <thead> <tr class="toprow"> <td /> <td>Parameter</td> <td>Value</td> <td>DataType</td> </tr> </thead> <tr> <td class="leftcol"> </td> <td>name</td> <td>Mark</td> <td>String</td> </tr> <tr> <td class="leftcol"> <a><img border="0" alt="expand/collapse" class="expandable" height="11" onclick="changepic(event)" src="images/expand.gif" width="9" child="s2" p21="p21" p22="p22" p22="p23"></a> </td> <td>composite</td> <td>100,200,red</td> <td>CompositeType</td> </tr> <tr> <td colspan="4" bgcolor="cyan" class="collapsed" id="s2"> <table id="sub"> <tr> <td> </td> <td>X</td> <td>100</td> <td>Int32</td> </tr> <tr> <td> </td> <td>Y</td> <td>200</td> <td>Int32</td> </tr> <tr> <td class="leftcol"> <a><img border="0" alt="expand/collapse" class="expandable" height="11" onclick="changepic(event)" src="images/expand.gif" width="9" child="s3"></a> </td> <td>color</td> <td>134,122,234</td> <td>Color</td> </tr> <tr> <td colspan="4" bgcolor="cyan" class="collapsed" id="s3"> <table id="sub"> <tr> <td> </td> <td>R</td> <td>134</td> <td>Int32</td> </tr> <tr> <td> </td> <td>G</td> <td>122</td> <td>Int32</td> </tr> <tr> <td> </td> <td>B</td> <td>234</td> <td>Int32</td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </body> I am having a problem with a web page that when I use the echo statement and try to output data to the web page in a table the data in the table pushes the data from another row down the page. What should I do to stop this from happening. I am using adobe dreamweaver. Thanks a lot!! I need help. I have a page but its centered. I still have white non used space on both sides that i would like to use to post links and what not but im not too great with tables. My test website is down below. Id like to keep the same dimensions of the page where it is now, but need to be able to use the blank white space on the sides to post links and extra text and what not. Can anyone help? www.militarycheapskate.com Hello, I would like to make my two column web page into 3 columns and dont know how to do this. It is a template and I cannot figure out where to put the <td>. My site is online and then I hope to delete this link if it is possible. Please no negative remarks as I am notlooking for visitors I just want help. please. ] Here is the code I want to put into the code but not sure where to put it to get the 3rd column. I hope someone will be kind enough to help . thanks. <td width="200"> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td width="200"> <p> <a href="index.html">Home</a> </p> </td> </tr> </table> i just started learning html today. and trying to get cell alignments figured out. I know in word, and other programs you can align text in 9 different spots in a cell. Top left, top center, top right middle left, middle center, middle right bottom left, bottom, center, bottom right but while im trying to use align="center" or using valign="middle" i cant get the text to align to the center of a cell only using align i can move across the top of the cell and using valign i can move across the left of the cell is there a way to use both together to get to the other portions of the cell ? Hi, I have been challenged with creating the HTML for a news article list which is going on a website. I have started out by creating a test list using <ul><li> tags This is what the list looks like http://design2rent.co.uk/menu_test/index.html The data for this list will be grabbed from a database but the designer would like to have the date aligned to the right instead of at the end of the article, i have uploaded an image here for what the end result should look like. ignoring the backgroudn images ect as this is just a snippent of the design is it possible to have 1 list item split into 2 cells and align one of them to the left and the other to the right to acheive the end result layout? I've racked my brains with divs and tables but can't seem to find a solution and tried many google searches but not found any relevent topics. any help would be hugely appreciated Hi, I am developing a calendar application in ASP. The calendar is displayed in a table where each cell represents a date and has a + and - in it. The + represents people working on that date and the - those who are off. I need to add 'title' information to table cells so that when the user moves the cursor over the + or - the respective information to be shown. I tried to do this as follows: <td><title = "worklist">+</title><title="freelist">-</td> This doesn't work, nothing appears when the cursor hovers over either the + or -. I can combine the worklist and freelist and display it in one go with: <td title="listall">+=</title> but this is unsatisfactory. Too much data is displayed and the result looks messy. I dont want to double the amount of cells by having + and - in seperate cells either. Is there a trick that allows seperate <title> info in the same cell. Help would be appreciated, regards, Guy how to manage cells height, e.g. have control over them in HTML, say I want a height to be 2px. site http://members.dodo.com.au/~rouslan/...ite/index.html td height and tr height codes didn't work, table or cells keep stretching themselves up or down Hi, I'm new to HTML, i pretty much learned it by myself with online tutorials. Now i'm having problems with this web layout, There are empty spaces between cells and I can't remove them no matter what I do. I used cellpadding="0" and cellspacing="0" and style="border-collapse: collapse" but it made no difference. This is only happening on FireFox. On Internet Explorer it appears fine. I'm sure that I'm doing some stupid mistake somewhere. Here's the code of the whole page: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Using CSS</title> <style> body { margin:0; } </style> </head> <body topmargin="0" leftmargin="0" bottommargin="0"> <table cellpadding="0" border="1" style="border-collapse: collapse" cellspacing="0" height = "100%"> <tr> <td><img src="images/Gray-Cut-(layout)_01.gif" height="64"></td> <td><img src="images/Gray-Cut-(layout)_02.gif" height="64"></td> </tr> <tr> <TD class="example" width="786" colSpan="2" heigh="100%"> <TABLE id="Table2" height="100%" cellSpacing="0" cellPadding="0" border="1" style="border-collapse: collapse"> <TR> <TD><IMG height="21" alt="" src="images\Gray-Cut-(layout)_03.gif" width="182"></TD> <TD width="100%" rowSpan="5"><iframe name="iframe" src="home.html" height = "100%" width="100%" frameborder="0"></iframe></TD> </TR> <TR> <TD><IMG height="24" alt="" src="images\Gray-Cut-(layout)_05.gif" width="182"></TD> </TR> <TR> <TD><IMG height="24" alt="" src="images\Gray-Cut-(layout)_06.gif" width="182"></TD> </TR> <TR> <TD><IMG height="35" alt="" src="images\Gray-Cut-(layout)_07.gif" width="182"></TD> </TR> <TR> <TD height="100%"> </TD> </TR> </TABLE> </TD> </tr> </table> </body> </html> Hi, here's my code, and things are working as they should. My only problem is I can't seem to move my drop-down list from the cell it is in to the cell left one. (see photo) Can anyone see from my code whats going wrong? Site url: http://www.walthamforest-fc.co.uk/st...layer.php?id=3 Code: <TABLE WIDTH="520" ALIGN=center BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR VALIGN=middle ALIGN=center> <td><img src="http://www.walthamforest-fc.co.uk/stats/images/playerbar.jpg"></TD> </TR> <tr VALIGN=left ALIGN=center> <td><img src=" <?php echo $image_url = "images/" . $playerdata['id'] . "_1.jpg"; ?>"/><img src=" <?php echo $image_url = "images/" . $playerdata['id'] . ".jpg"; ?>"/> </td></tr> <tr> <td background="/stats/images/playernameback.jpg" width="308" height="46"> <font face="Arial" size="4"><span style="letter-spacing: 0pt"><font color="#018609"> <?php echo "$playerdata[firstname]" ?> <?php echo "$playerdata[lastname]" ?> </TD> <td> <td background="/stats/images/playernameback.jpg" width="202" height="46"><?php // //Haetaan kaikki pelaajat dropdownia varten // $sql = ' SELECT P.PlayerID AS id, P.PlayerLastName AS lastname, P.PlayerFirstName AS firstname, P.PlayerPublish AS publish FROM tplss_seasons S LEFT OUTER JOIN tplss_players P ON P.PlayerID = S.SeasonPlayerID '; if($defaultseasonid == 0) { $sql .= " WHERE P.PlayerID != '' AND P.PlayerPublish = '1' GROUP BY id ORDER BY firstname, lastname"; } else { $sql .= " AND S.SeasonID = '$defaultseasonid' WHERE P.PlayerID != '' AND P.PlayerPublish = '1' GROUP BY id ORDER BY firstname, lastname"; } $query = mysql_query("$sql", $connection) or die(mysql_error()); echo"<select name=\"playerid\">"; while($data = mysql_fetch_array($query)) { if($data['id'] == $id) { echo"<option value=\"$data[id]\" SELECTED>$data[firstname] $data[lastname]</option>\n"; } else { echo"<option value=\"$data[id]\">$data[firstname] $data[lastname]</option>\n"; } } echo"</select> <input type=\"submit\" name=\"change_player\" value=\"$txt_change\">"; mysql_free_result($query); $ttl = (($_SESSION['getAdditional'] + 1) % 2) ? "Show": "Hide"; ?> </td> </tr> Hello, I made a goofy little website at adamvonwillis.com and if you look at the home page you will see a gap between the first and second rows. The rows need to be touching. If anyone could look at the code and help me out I would be very greatful! Thank you! When you have a table, and there is a lot of text in cells and you dont want the ENTIRE table stretch, what code can you add to the cell in order to give it scrollbars? The only way I found online is by css, but I'm not sure where to add the code. Any tips/help? Hi: I have a long table (613 rows) with two columns (Containing Names, Addresses, Lot Numbers, and Phone Numbers, etc. I would like to format the cells of each column so that certtain fields (e.g., Phone Number is in a certain position in each cell). For example, I'd like this phone number to be right-aligned in the second row of each cell, etc Is there a standard, or easy way to do this ?? Thank for any help offered. -Mel Smith For some reason i can't resize the weight on the cells i highlighted in black on the code below Code: <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><table width="700" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="388" height="92" background="top11.jpg"> </td> <td width="312" height="92" background="top12.jpg"> </td> </tr> <tr> <td width="700" height="353" colspan="3" background="main.jpg"> </td> </tr> <tr> <td width="269" height="149"><a href="ImagensFinaisSite/picsleft/2.jpg" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('LeftPic','','ImagensFinaisSite/picsleft/2_on.jpg',1)" onClick="return popImage(this.href,'Site author');"><img src="ImagensFinaisSite/picsleft/2_off.jpg" alt="Clicar na imagem para ampliar" name="LeftPic" width="269" height="149" border="0" id="LeftPic"></a></td> <td width="157" height="149"><a href="ImagensFinaisSite/picscenter/1.jpg" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('CenterPic','','ImagensFinaisSite/picscenter/1_on.jpg',1)" onClick="return popImage(this.href,'Site author');"><img src="ImagensFinaisSite/picscenter/1_off.jpg" alt="Clicar na imagem para ampliar" name="CenterPic" width="157" height="149" border="0" id="CenterPic"></a></td> <td width="274" height="149"><a href="ImagensFinaisSite/picsright/2.jpg" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('RightPic','','ImagensFinaisSite/picsright/2_on.jpg',1)" onClick="return popImage(this.href,'Site author');"><img src="ImagensFinaisSite/picsright/2_off.jpg" alt="Clicar na imagem para ampliar" name="RightPic" width="274" height="149" border="0" id="RightPic"></a></td> </tr> </table></td> </tr> <tr> </tr> </table> These are the cells i can't resize: <td width="388" height="92" background="top11.jpg"> </td> <td width="312" height="92" background="top12.jpg"> </td> I've tried messing around with colspan but i just can't get it working. Any idea whats wrong? Is there any way to get text to float from one cell to the other? And if not, is there any other way i can solve the problem of getting text around a picture? example: <table> <tr> <td>text start</td> <td>picture</td> </tr> <tr> <td colspan="2">text end</td> </tr> </table Can anyone tell me why? Not sure what is going on here... Here is a link to the development site where you can see the problem I am having (I did not design it, but I am in charge of changing to html). http://www.vismarkgroup.com/dev/Kyrie/about.html Thanks!! |