HTML - Table Confusion!
Hello all. This is my first post here. I have a question regarding tables, divs, just basically anything to do with that area, etc. I am making a simple javascript calculator, and what I want to do with it is put it in a table. Just simple forms, buttons, tables, and divs. My problem, however, is that I need to have the operators (add, minus, subtract, divide buttons) centered along the bottom across. Right now, the code is causing the buttons to be in somewhat a "grid" and stuck to the right side of the table. I've tried <div align="right">, i've also tried <td align="right">.. Yet with no luck. I kindly ask for anyone generous enough to help me to please review my code I'm going to paste into this message.
Thanks for reading. tl;dr: I need the buttons on the bottom to be centered horizontally, not stacked and positioned in the right side of the table. ps. if I was unclear about anything, please ask me, and I will try my best to explain. index.html Code: <!DOCTYPE html PUBLIC "~//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Document Title</title> <meta name="Generator" content="x" /> <meta name="Author" content="x" /> <meta name="Keywords" content="x" /> <meta name="Description" content="This is a simple calculator" /> <style type="text/css"> body { background-color:#d0e4fe; } #btnadd { background-color:white; border-color:#0000FF; color:blue; font-size:15px; } #btnminus { background-color:white; border-color:#0000FF; color:blue; font-size:15px; } #btndiv { background-color:white; border-color:#0000FF; color:blue; font-size:15px; } #btnmult { background-color:white; border-color:#0000FF; color:blue; font-size:15px; } h1 { color:orange; text-align:center; } p { font-family:"Times New Roman"; font-size:20px; } </style> <script language="javascript"> function fadd() { var first,sec,res; //Take the value of first textbox and convert it to float first=parseFloat(document.forms[0].txt1st.value); //Take the value of second textbox and convert it to float sec=parseFloat(document.forms[0].txt2nd.value); res=first+sec; //show the result in alertbox alert("the result is "+res); //show the result in the result textbox document.forms[0].txtresult.value=res; } function fminus() { var first,sec,res; //Take the value of first textbox and convert it to float first=parseFloat(document.forms[0].txt1st.value); //Take the value of second textbox and convert it to float sec=parseFloat(document.forms[0].txt2nd.value); res=first-sec; //show the result in alertbox alert("the result is "+res); //show the result in the result textbox document.forms[0].txtresult.value=res; } function fdiv() { var first,sec,res; //Take the value of first textbox and convert it to float first=parseFloat(document.forms[0].txt1st.value); //Take the value of second textbox and convert it to float sec=parseFloat(document.forms[0].txt2nd.value); res=first/sec; //show the result in alertbox alert("the result is "+res); //show the result in the result textbox document.forms[0].txtresult.value=res; } function fmult() { var first,sec,res; //Take the value of first textbox and convert it to float first=parseFloat(document.forms[0].txt1st.value); //Take the value of second textbox and convert it to float sec=parseFloat(document.forms[0].txt2nd.value); res=first*sec; //show the result in alertbox alert("the result is "+res); //show the result in the result textbox document.forms[0].txtresult.value=res; } function pushButton(buttonValue) { if (buttonValue == 'C') { document.getElementById('txt1st').value = ' '; document.getElementById('txt2nd').value = ' '; } else { document.getElementById('txt1st', 'txt2nd').value += buttonValue; } } </script> </head> <body> <form name="cal" method="post" action=""> <table width="310px" border="0" cellspacing="0" cellpadding="20px"> <tr> <td width="40%"><div align="left">Enter 1st number </div></td> <td width="81%"><input name="txt1st" type="text" id="txt1st"></td> </tr> <tr> <td><div align="left">Enter 2nd number </div></td> <td><input name="txt2nd" type="text" id="txt2nd"></td> </tr> <tr> <td height="28"><div align="left">Result </div></td> <td height="28"><input name="txtresult" type="text" id="txtresult"></td> </tr> <tr> <td height="21"> <div align="left"> </div></td> <td width="100%"> <input name="btnadd" type="button" id="btnadd" value="Add" onclick="fadd()"> <input name="btnminus" type="button" id="btnminus" value="Subtract" onClick="fminus()"> <input name="btndiv" type="button" id="btndiv" value="Divide" onClick="fdiv()"> <input name="btnmult" type="button" id="btnmult" value="Multiply" onClick="fmult()"> <br> <input name="btnClr" type="button" id="btnClr" value="C" onclick="pushButton(this.value);"> </td> </tr> </table> </form> </body> </html> To further explain how I wish the buttons to be positioned: Go here > http://koderguru.com/tutorials/javas...culatorex1.php. See how the buttons are aligned horizontally? I want it like that, but across the whole bottom. Thanks again for reading!! I hope to view your replies soon! Similar TutorialsI am totally confused about DOCTYPE code. My site does not have any doctype code on it and works fine, however been playing about with some jquery script and it wanted a doctype on my site to work. I have tried all the different doctypes listed on the w3 site and all make my site look strange and text/images all over the place the only way the site looks ok is without doctype. please advise the site in question is http://virtualhunterston.eu.org example test page with doctype added http://www.virtualhunterston.eu.org/...0-%20Copy1.htm I'm trying to re-do and validate all my 100+ websites; this one is the most recent: http:// www.sticksite.com/cook/indexNEW.html and after "Tidy" cleaned it up I now have the very top looking like this which I know is not right: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> --> <html> <head> <meta name="generator" content="HTML Tidy for Linux (vers 1 September 2005), see www.w3.org"> <meta content="text/html; charset=utf-8" http-equiv="content-type"> <title>Fast, nutritious meals</title> My pages are nothing fancy, I just want them to work. "Transitional" is fine; I'm not worried yet about "Strict." I'm validating at http://validator.w3.org/ Can one of you super HTML specialists please tell me how the top of my pages SHOULD look? Many thanks in advance! ok, ive made a form that allows people send comments to my email, this is the first form ive made http://www.freewebs.com/narcotica/contact.htm but the form does not work i have checked website and i still cant work out why it wont work, the same message comes up "This form is inoperational!" so please could someone help me here. Thanks, Narc Here's my code: HTML Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Content-Language" content="EN-GB"> <html> <head> <title>History Project - Home</title> <link rel="stylesheet" type="text/css" href="Data\pagestyle.css"> </head> <body> <!-- Start Navigation Board --> <div class="navboard"> <img src="Data\logo.png"> <p class="txt1"><a class="nav" href="\">Towns</a></p> <p class="txt1"><a class="nav" href="\">Life</a></p> <p class="txt1"><a class="nav" href="\">Entertainment</a></p> <p class="txt1"><a class="nav" href="\">Guilds</a></p> <p class="copy">© Copyright Joshua Wilkinson.</p> </div><!-- End Nav Board --><!-- Start page text --> <p class="txt2">Welcome!</p> </body> </html> And here's the css: Code: body { background-color:#660000; margin:0px; overflow:; } div.navboard { background-color:#9E0000; position:absolute; height:100%; width:126px; float:left; } p.txt1 { margin:0px; text-align:center; font-size:17; } a.nav { color:#000000; margin:0px; text-decoration:none; position:relative; } p.copy { color:#000000; font-size:10; text-align:center; } p.txt2 { color:#000000; font-size:18; margin-left:130px; float:right; } Now I want the lighter part to be on the left as it is, but then I want the text to be about 4px away from it at the top-left. But whenever I try to put it right, it all goes wrong. Anybody help? If you need me to answer a question, I'm subscribed to this thread. Hi Hope someone can help and old silver surfer who is completely confused. I have built a site http://beautyadvicestore.com/skincare using dreamweaver with the following result. In IE7 the sales page is OK until 75% down when the black background obscures the print. This is the only fault apart from the fact I have not loaded one of the pictures (a small matter) In Firefox the sales page is OK all the way down but when I try to load the articles from 'Tips Tricks and Secrets' at the bottom of the sales page which goes to an article index page http://beautyadvicestore.com/skincare/articleindex.php the articles load without the graphics. I have tried saving the articles as html and php formats with no difference all graphics show in IE7 but not in Firfox. Strange thing is it is ONLY the articles that this happens all other pages are OK Privacy- about us- contact us etc. All have graphics. I have used the same template throughout only adding text. Can anyone help to show what I am doing wrong this is the first time this has happened in my limited experience. regards Okay, I have a problem. I haven't been doing this long, but when I coded my website, it looked fine the way it was (in Firefox), but I recently checked the look in Opera and Internet Explorer, and the whole layout falls apart. I have no idea what the problem is, can anyone suggest some possible problems? Here is the URL: Homepage EDIT: My message was over 10,000 characters, so please view the source code. Thank you. Hi, I'm trying to make a portfolio website where when you hover your mouse over a "thumbnail A", "image A" appears in a separate div and when you move your mouse off the "thumbnail A", "image A" goes away. I made it do that with "onmouseover" and "onmouseout" codes, but now i want to make it so when you click on "thumbnail A", "Image A" stays visible even when you move your mouse away using an "onclick" behavior code. But the code is getting confused by the "onclick" conflicting with the "onmouseout" behavior code, so "image A" still dissapears when you move your mouse off the thumbnail. Is there a way to fix this or a better way to do this??? Thanks!! Hi, I've been looking at a friends website, built by a design company, which is not gathering much in the way of hits. I've noticed that the keyword and description tags are in single quotes, rather than double quotes. An html online check tells me that there are no tags on the page. Can anyone tell me whether this use of single quotes would stop a searchengine seeing the tags, please? Or do I need to look elsewhere for the problem? Ian Hey folks - Everywhere I've read states that if I give a series of checkboxes the same name, then upon hitting submit, I will get a comma separated list of the values. But, that just isn't working for me. I have this code : Code: <html><body> <form method="get"> <input name="input" size="30" maxlength="100" id="searchbox" value="test" /><br /> <input type="checkbox" name="referBy" value="td"/> Test driven a vehicle<br/> <input type="checkbox" name="referBy" value="dlr"/> Visited an autotmotive dealer<br/> <input type="checkbox" name="referBy" value="veh"/> Purchased/Leased a vehicle<br/> <input type="checkbox" name="referBy" value="ins"/> Purchased automobile insurance<br/> <input type="submit" value="Submit"/> </form> </body> </html> But, it results in this for the URL - ...../s_r2.htm?input=test&referBy=td&referBy=dlr Any thoughts Maybe I'm missing a step or a setting Syl Hi there guys, I'm a newb to forms in Dreamweaver, so any help will be appreciated. I would like a form on my DJ website that asks the potential customer how many hours they want a disco for, their location and any extras they want to have with the package. The form will then calculate the value of everything and give them a price. I would like to display this answer only after the visitor clicks on a button, rather than just have the information pop up/recalculate every time the visitor changes something on the form. Thanks guys! Here is an image depicting the trouble I'm having: I want to make a table, consisting of many cells. These cells would be fixed, and *very different* in sizes. It's easy to make a no-space table when all the images are exactly the same size, but when you have images with a variety of sizes, the table doesn't fit perfectly. Basically I want to create a collage of images with overlay text on each image. My idea was that I could create a table, and each cell (td) would have a background which is the image. Then I could just type in that cell, so the text would be over the image. Then I'd do this for every one of my images, and a collage would be formed. The problem is, the table makes large white spaces wherever the image sizes don't match! How do I get rid of these spaces, or is there an entirely different code/approach I should be using? Thanks! Here is my current code: HTML Code: <html> <head> <style type="text/css"> table.nospace { padding: 0; margin: 0; border-collapse: collapse; } table.nospace tr { padding: 0; margin: 0; } table.nospace td { padding: 0; margin: 0; } </style> </head> <body> <TABLE class="nospace" width="2040px" height="2000px" cellspacing="0px" cellpadding="0px"> <TR> <td valign="top"> <table><tr> <TD WIDTH="800px" HEIGHT="800px" BACKGROUND="image.jpg" VALIGN="bottom"> <h1><FONT COLOR=#ffffff>text</FONT></h1> </TD></tr></table> </td> <td valign="top"> <table><tr> <TD WIDTH="700" HEIGHT="497" BACKGROUND="image" VALIGN="bottom"> <h1><FONT COLOR=#ffffff>Text</FONT></h1> </TD></tr></table> </td> <td valign="top"> <table><tr> <TD WIDTH="700" HEIGHT="467" BACKGROUND="image.jpg" VALIGN="bottom"> <h1><FONT COLOR=#ffffff>Text</FONT></h1> </TD></tr></table> </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! I will be brief in hoping that the issue does not require a thesis to properly fix. I'm dealing with tables within tables..within tables. In one instance, I have a 2x1 (row by column) table inside another table. So, we'll call the inside table "B" and the outside table "A". Table B is centered inside a column in Table A. I'm trying to maximize the space, but nearly nothing works. Setting Table B height=100% does nothing. The only thing that works is setting the height=N px, where N is a number. This is no good, as I want to the site to work on all resolutions. I want it to be proportional. How can I fix this? Here's what I'm dealing with, visually: Any help would be welcome. Thanks. I would like to know if there is such a thing as a tag within a table, that can collapse if the next table within that prior one gets too big to center? Here is an example of a part of my code: Code: <table style="width:757; border-style:solid; border-width:thin; margin:0 0 15px 0"> <tr><td class="spb-category" width="750" style="text-align:left;" colspan="3">Title of this category</td></tr> <tr> <td valign="top" width="33%"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td width="100%" onmouseover="this.style.background='#ddddff';" onmouseout="this.style.background='#ffffff';"><table border="0" cellpadding="0" cellspacing="0"><tr><td class="spb-book"><a href="product_info.php?products_id=103">large size book title with author</a></td></tr><tr><td class="spb-author">Author</td></tr></table></td></tr> <tr><td width="100%" onmouseover="this.style.background='#ddddff';" onmouseout="this.style.background='#ffffff';"><table border="0" cellpadding="0" cellspacing="0"><tr><td class="spb-book"><a href="product_info.php?products_id=187">small sized book</a></td></tr><tr><td class="spb-author">Author</td></tr></table></td></tr> <tr><td width="100%" onmouseover="this.style.background='#ddddff';" onmouseout="this.style.background='#ffffff';"><table border="0" cellpadding="0" cellspacing="0"><tr><td class="spb-book"><a href="product_info.php?products_id=197">small sized book</a></td></tr><tr><td class="spb-author">Author</td></tr></table></td></tr> </table> </td> <td valign="top" width="33%"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td width="100%" onmouseover="this.style.background='#ddddff';" onmouseout="this.style.background='#ffffff';"><table border="0" cellpadding="0" cellspacing="0"><tr><td class="spb-book"><a href="product_info.php?products_id=101">small sized book</a></td></tr><tr><td class="spb-author">Author</td></tr></table></td></tr> <tr><td width="100%" onmouseover="this.style.background='#ddddff';" onmouseout="this.style.background='#ffffff';"><table border="0" cellpadding="0" cellspacing="0"><tr><td class="spb-book"><a href="product_info.php?products_id=188">small sized book</a></td></tr><tr><td class="spb-author">Author</td></tr></table></td></tr> <tr><td width="100%" onmouseover="this.style.background='#ddddff';" onmouseout="this.style.background='#ffffff';"><table border="0" cellpadding="0" cellspacing="0"><tr><td class="spb-book"><a href="product_info.php?products_id=120">Medium sized boot title</a></td></tr><tr><td class="spb-author">Author</td></tr></table></td></tr> </table> </td> <td valign="top" width="33%"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td width="100%" onmouseover="this.style.background='#ddddff';" onmouseout="this.style.background='#ffffff';"><table border="0" cellpadding="0" cellspacing="0"><tr><td class="spb-book"><a href="product_info.php?products_id=102">a very long title of a book which includes the author</a></td></tr><tr><td class="spb-author">Author</td></tr></table></td></tr> </table> </td> </tr> </table> 1. I want to center each column so that the first letter of each book title is lined-up, but that the longest title on each column has equal space on both left and right. 2. If you look at each column, the width is about 245px. With regard to the first book title in the first column, I have 50px that is extra, therefore I'd like to automatically add 25px to the front of each one of the books for that column. 3. On the second column, there is about 80px extra, therefore I'd like to auto-add 40px to the front of each book in that column. My problem is that I don't want the column centered individually because then I will lose the straight line that I'd like each book to be on top of each other as it starts the line. I tried: style="margin-left:20px" and style="padding-left:20px" but when the title got too long it would not auto-collapse the left side, I want it to collapse! I want one tag that I can insert evenly on every section to get the push to the right an even amount of spaces for every book on each column. If it comes down to it, I wouldn't mind sacrificing that each column gets auto aligned to what is necessary for its own column. So if I have to use one number, say 30px, for the whole webpage, then ok, I'd do it. My problem is that sometimes the 30px empty filler space for the left, in order to push the title to the right, is not enough space for a very long title and it winds up sending half the title to the next line, which I don't want. This code is a list of books that spans about 20 categories and about 400 book titles. Thanks in advance for any help you might offer. I have a list within a table and much of the content has links to two different javascript codes. One is a popup javascript to so that I can control the window size and the other is a toggle.display javascript to show/hide specific details about my list. The scripts run fine, but for some odd reason the content in my table gets cut off randomly towards the end of the list. I went through to make sure that I didn't have any div tags nested.. etc.. and i'm now at a complete loss as to why my content within the table gets randomly cut off. Any help would me much appreciated. The link for the site is he http://netimpact.org/displaycommon.c...rticlenbr=2440. You'll notice at the very bottom of the table it randomly stops.. Hello, I am newbie, just has started my adventure with html. I tried to make an easy static site, without any additional thingd, but it occured a problem. 1. I mean, as I put table in table because I did know how to to id in different way, to make buttons on the left stay up while text on the right is moving- if I do normal table with 2columns and on the left lets say 5rows for buttons, on the right I unite all rows to make one big sort of box for contents, as I go down and try to write something morre, the rows from the letf were enlarging too If the size of explorer or firefox is nor full screen, the text in contents is going away (like now in lycos server, where screen is not full, but "cut" by advertise) 2. I have highlighted buttons, but not always works, why? (i mean it works, but darker buttons are charging so slow- maybe it is so because i saved them in pgn instead in gif, and each one is about 50kb?) -probably it is not this- because I have just changed into gif, and it is still the same 3. Another problem, as I post the site, I have notice, that in firefox I can not navigate with buttons, while in explorer yes, is it a fault of my coding, or of server where I put website? Here I post my website: http://members.lycos.co.uk/aniaacolgate/ Could someone take a look on the code, and will be so kind to correct me? It is a basic easy site of very begginger I just wanted to make a shape like this: - top: a banner - buttons in horizontal and vertical way - under buttons: contents (sincerly would like to put frames, but do not know how to put them there, is on the left there r buttons Thank you so much in advance for reply Sorry for mistakes in language the bold stuff is what i added in to try and make it sortable and it didn't work. 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"><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><title /> <link rel="stylesheet" type="text/css" href="example.css"/> <meta name="author" content="my name" /> <link href="http://www.joostdevalk.nl/" rev="made" /> <script type="text/javascript" src="sortable.js"></script><meta name="generator" content="StarOffice/OpenOffice.org XSLT (http://xml.openoffice.org/sx2ml)" /><meta name="author" content="my name" /><meta name="created" content="2007-04-03T18:49:47" /><meta name="changedby" content="Ryan Gleason" /><meta name="changed" content="2007-05-04T16:38:49" /><base href="." /><style type="text/css"> @page { } table { border-collapse:collapse; border-spacing:0; empty-cells:show } td, th { vertical-align:top; } h1, h2, h3, h4, h5, h6 { clear:both } ol, ul { padding:0; } * { margin:0; } *.ta1 { } *.ce1 { font-family:Arial; border-bottom-width:0.0351cm; border-bottom-style:solid; border-bottom-color:#000000; border-left-style:none; border-right-width:0.0133cm; border-right-style:solid; border-right-color:#000000; border-top-style:none; font-weight:bold; } *.ce2 { font-family:Arial; border-bottom-width:0.0351cm; border-bottom-style:solid; border-bottom-color:#000000; border-left-width:0.0133cm; border-left-style:solid; border-left-color:#000000; border-right-width:0.0133cm; border-right-style:solid; border-right-color:#000000; border-top-style:none; font-weight:bold; } *.Default { font-family:Arial; } *.Heading { font-family:Arial; text-align:center ! important; font-size:16pt; font-style:italic; font-weight:bold; } *.Heading1 { font-family:Arial; text-align:center ! important; font-size:16pt; font-style:italic; font-weight:bold; } *.Result { font-family:Arial; font-style:italic; font-weight:bold; text-decoration:underline; } *.Result2 { font-family:Arial; font-style:italic; font-weight:bold; text-decoration:underline; } *.co1 { width:1.3516in; } *.co10 { width:0.7854in; } *.co11 { width:0.5681in; } *.co12 { width:0.8925in; } *.co2 { width:0.9925in; } *.co3 { width:0.6984in; } *.co4 { width:0.622in; } *.co5 { width:0.372in; } *.co6 { width:0.3827in; } *.co7 { width:0.9055in; } *.co8 { width:0.6661in; } *.co9 { width:0.6772in; } *.ro1 { height:0.1783in; } </style></head> <body dir="ltr"> <table class="sortable" id="anyid" cellpadding="0" cellspacing="0"> <table border="0" cellspacing="0" cellpadding="0" class="ta1"> <colgroup><col width="150" /><col width="110" /><col width="78" /><col width="69" /><col width="41" /> <col width="42" /><col width="101" /><col width="110" /><col width="74" /><col width="78" /><col width="75" /><col width="75" /><col width="75" /><col width="87" /><col width="63" /></colgroup> that should be what you need..i exported an excel file as an xhtml file and read the source code and that's how it was, real unorganized and such. basically it's got stats of baseball players and i want to make them easily sortable. i created a sortable table using another piece of code but have to manually enter everything in if i do it that way. It's hard to explain, but basically I want to achieve creating a smaller file looking portion of my site, with a larger around and tabs. Basically this: I currenty just have the outer red table, using .gif's to round the corners. I tried copying the code again to place in the middle of the red table code and it doesn't work. Any help to achieve this effect would be great. Here is the code I am using: PHP Code: <table width="450" cellpadding="0" cellspacing="0" border="0" style="background-color: #086591"> <tr> <td width="14"><img src="images/top_left.jpg" width="14" height="14" border="0" alt="..." /></td> <td width="172"></td> <td width="14"><img src="images/top_right.jpg" width="14" height="14" border="0" alt="..." /></td> </tr> <tr> <td></td> CONTENT HERE <td></td> </tr> <tr> <td><img src="images/bottom_left.jpg" width="14" height="14" border="0" alt="..." /></td> <td></td> <td><img src="images/bottom_right.jpg" width="14" height="14" border="0" alt="..." /></td> </tr> </table> Thanks for any help. I have a table and after I select the question (the ball) I would like the answer to come up in another column in that table. Is that too much? Keep'er simple please. Thanks. Hi, i'm completely new with HTML. I'm making a website for a student activity group i'm in. We chose for me, because i had a little javascript experience. Thats more than most of us. Here goes the story. We are organizing a trip for other students. The students can enroll for the trip on the website. The form uses the following code; Code: <?php $myFile = "enrollments.php"; $fh = fopen($myFile, 'a+') or die("can't open file"); $stringData ="<tr><td>".$_POST["name"]."</td><td>".$_POST["tel"]."</td><td>".$_POST["mail"]."</td><td>".$_POST["rnumber"]."</td><td>".$_POST["shirt"]."</td><td>".$_SERVER['REMOTE_ADDR']."</td><td>".date("d-m, G:i:s")."</td></tr>\n"; fwrite($fh, $stringData); fclose($fh); ?> Named post.php The code results in a simple file with only <tr>info</tr><tr>info2</tr>. Another page uses the following code to show the enrollments Code: <table id='enrollments'><tr><th>Name</th><th>Tel</th><th>Mail</th><th>Reknumber</th><th>Shirt</th><th></th><th>IP</th><th>Time</th></tr> <?php include('enrollments.php'); ?> </table> named showenroll.html Right. So far so good. Now we'd like to show the students which are thinking about enrolling howmany other students already have enrolled. In other words, i'd like to count the number of rows in the "showenroll.html" and display that in the index.html. Ive found trough google the var (document.getElementById('ID')). However, i'm not able to add this var to the index.html, and direct it to a element ID on another page. As most newbs would do, i've tried document.getElementById('./showenroll/enrollments') I'm wondering if anyone could tell me how i can direct the document.getElementById to an element id that is not on the same page. And, if this is impossible, how i can make a counter of the enrollments Drayn p.s. ive tried to search this forum on table row counter, but it didn't provide the right solution(s?) for me. |