HTML - Html Tables Ignoring Spaces
Hi there everyone, I'm having a bit of trouble with some of my tables. In the cells of one of my tables I want to align the text right with an extra space at the end of the text. However, the align right ignores any spaces that I try to add to the cell and ends up deleting it.
My question is, how can I get the tables to display spaces and not delete them? Thanks. Similar Tutorialsi cant seem to get rid of the space between my two images in this table to align my layout images flush with each other . anyone got any ideas? here is an example of what my problem is: http://hollecost.webs.com/index.htm heres the table coding for that example page of my problem: <table cellspacing="0" cellpadding="0"> <tr> <td> <img src="/images/top.jpg"> </td> </tr> <tr> <td background="/images/bottom.jpg" height="440" > </td> </tr> </table> I have two graphics in a cell. If I only put in the top one, everything is fine. Once I insert the bottom one in, a space to the right of the top one appears. I cant get rid of it. Anyone have any ideas? TIA Scott Hello, My name is Eli and I cannot figure out why in the 2nd and 3rd rows of this HTML table there are empty spaces between the columns, making these rows go over the table width limitation of 770. I would really appreciate some help, as it is getting very frustrating and I am sure there is a very simple solution that I am missing. I've searched threads but could not find the right answer. Here is the table HTML code: <table border="0" align="left" cellspacing="0" cellpadding="0" width="770"> <tr> <td width="770" height="1" colspan="2" bgcolor="#FFFFFF"><img src="http://yst.sale-la-vie.com/images/spacer.gif" alt="spacer" width="4" height="1" border="0" align="middle" /></td> </tr> <tr> <td colspan="2" align="left" valign="top" bgcolor="0"><img src="http://yst.sale-la-vie.com/images/main-mid.jpg" alt="" border="0" /></a></td> <td align="left"><img src="http://yst.sale-la-vie.com/images/right-mid.jpg" alt="" border="0" /></a></td> </tr> <tr> <td align="left"><img src="http://yst.sale-la-vie.com/images/mid-necklaces-img.jpg" alt="" border="0" /></a></td> <td align="left"><img src="http://yst.sale-la-vie.com/images/mid-earringss-img.jpg" alt="" border="0" /></a></td> <td align="left"><img src="http://yst.sale-la-vie.com/images/mid-goodlook-img.jpg" alt="" border="0" /></a></td> </tr> <tr> <td align="left"><img src="http://yst.sale-la-vie.com/images/mid-bracelets-img.jpg" alt="" border="0" /></a></td> <td align="left"><img src="http://yst.sale-la-vie.com/images/mid-summer-img.jpg" alt="" border="0" /></a></td> <td align="left"><img src="http://yst.sale-la-vie.com/images/mid-newlook-img.jpg" alt="" border="0" /></a></td> </tr> </table> Thanks and best wishes, Eli Getting frustrated with this one as I can not seem to get a reply from anywhere else so REALLY hoping someone can help me here please! The problem is that I have a phpBB2 forum using a style called aphrodite. In every browser except IE7, when a sub-forum is viewed, the first column which contains the forum folder image, the width is correct. In IE7, the WIDTH is totally ignored and the size of the column is almost doubled! Best way to get an idea is by pics: In IE7 (which is display first column wrong): Snapshot from Firefox: This is a section of viewforum_body.tpl which displays the forum image on the left: Code: <td class="row3 row-center" width="30"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="25" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td> If anyone could give me any pointers or help I would be eternally grateful as this issue spoils the layout for IE7 members viewing my forum. Many thanks! (niote: I have tried asking at phpbb.com and phpbbstyles to no avail) Please look at my website in Internet Explorer and tell me why it has increased my left padding or maybe the margin on my main content, meaning my floats don't fit one one line. Also, why is it ignoring my margin-bottom value in my menu navigation (which is <li>s with a margin set? It's fine in every other browser under the sun, but messed up in IE. Please help!!! HTML Code: <table border="0" cellpadding="0" cellspacing="0" width="600"> <tbody> <tr> <td rowspan="10"> <img src="images/blank-1.gif" width="27" height="1035" /> </td> <td> <img src="images/blank-2.gif" width="445" height="43" /> </td> <td> <img src="images/s-trip-logo.gif" width="128" height="43" alt="S-Trip!" /> </td> </tr> <tr> <td width="425px"> <a href="http://www.edgeacademy.ca"><img src="images/edge-logo.gif" alt="EDGE Academy" width="425" height="115" /></a> </td> </tr> <tr> <td width="425px"> <img src="images/travel-for-credit.gif" width="425" height="34" alt="Travel for Credit \ Costa Rica \ England & France" /> </td> </tr> <tr> <td> <img src="images/book-now.gif" alt="Book now and save up to $500" width="148" height="150" /> </td> </tr> </tbody> </table> this is what it's producing: http://imageshack.us/photo/my-images...104at123t.png/ I'm trying to get the "book now and save" .gif to go up beside the EDGE logo. I'm a newbie at tables and am frustrated at this. When I "inspect element" the logo's <td> is saying the width is 445px when the width in the html is 425px. I am trying to create a HTML table with 1 row and 2 columns. Each column contains an already made table. I want to be able to scroll both columns down together but only scroll the right one across. I have attempted to do this with the following code: <div style=' height:500px; width:screen.width; overflow-y:scroll; overflow-x:hidden'><table> <tr> <td>".$left_column_table."</td> <td > <div style=' width:screen.width-200px; height: 500px; overflow-x:scroll; overflow-y:hidden'>". $right_column_table."</div> </td> </tr> </table> </div> The problem with this code is that the horizontal scroll bar isn't visible if the vertical scroll bar is scrolled up. How do I make the horizontal scroll bar stay on top so that it is always visible? A table with 3 colunms in each 2 rows and only one column in the 3rd row, hw to write html scrip for this? Hi im new here, and im going to start off with a table related question what I am trying to do is have table with a image in the back ground, this I can do fine, the other thing I want to have with in that first table is another table (5 x 16) For some reason when i try this it will work as two table one after the other when table one has a image but works fine when there is no image, does any one have any ideas as to why this is happening. or type the code our for me to see where im going wrong Thanks for looking, 09ricardo23 I create html pages for my small business, and I am experiencing great frustrations. I am creating a calendar, and I have tried restricting the cell widths to specific px and % sizes and have tried the same in using style attributes, but nothing I try will prevent the cell from expanding with the text and distorting the calendar format. Is there a way to absolutely restrict the width of a column/cell in a table? hey guys, Just wanted to know if this is at all possible. I have php pages that create tables through html that show data from my database. I want to know if i added like a print button on the page then get whatever is in the table and sent it to a pdf file to print out for a user. are there any example anyone could post or if this is in anyway remotely possible Hi html world, My name is Ken G (globalsolutions). I hope I am posting in the right place. I have an issue with one of my pages I created. Since I cannot put a link to the page, may I post the html code? The page looks almost alright. The page was screwed up so I took out the <td> and the <tr> tags, kinda straightened out allot of the mistakes. Now The header will not show up on the page. The page is an one time offer with 45 + products, so the page is quite long and it has 3 images that it uses for the frame border. I had to add 1 in more than once to extend the page. I have in put a background image graphic and the table is white, at the bottom I have sometimes more sometimes less black area on each side of the frame that I cannot get to go away. I tried for some time to fix this, and to no avail. I would like to learn how to fix this problem, so I can move on to new ones, lol I have allot more pages to build.Again I Hope I posted in the right area. Thanks in advance Hello, i was wondering if it is possible to send emails with html tables in them. I have attached an image of the type of table i would like to create. thanks Hey all, I am not even sure if this is possible, but I have wasted most of today trying to find out. Anyways, I am trying to create a very basic webpage (for local use) that will allow me to add records to a table that I can then come back to at a later date. Essentially, I want a mini spreadsheet in a HTML file. Is this possible? I know that I could do this using PHP, but I just want this for local use, so I do not want / need to upload it anywhere. Plus, I am not linking to any database, I am hoping just to have the table saved into the HTML file. I currently have a JS script that will add rows to my table (with predetermined information - not 100% what I am wanting), but once I close the window, that information is not saved. If anyone could at least point me in the right direction, that would be good (hopefully this all makes sense ) Hi all ! I have a quick question regarding a scoreboard app I am writing that displays 3 numbers on a large VGA screen. The question deals with best practice to build this page. I am using Visual Studio and but not any specific ASP.NET controls. The display consist of one table with 3 cells. one cell onto, 2 cells below the top one. Since I do not know the exact resolution of the VGA screen where my web page will display I have ventured to play with the zoom. However, using the zoom seems to offset the page downwards, meaning it does not zoom centered (or from the middle if you like). The more zoom I apply from the html the larger the page becomes, but it also moves down on the VGA screen. I am running the page in browser kiosk mode. It also seems to be very tricky to make the page position itself on the very top of the browser window. Using tables a problem, and if so, should I go with CSS ?? Thanks for input and thoughts on this.. Anders Ok guys, here is my problem. I want to start off first by saying I know tableless layouts are the way to go. With that said I inherited this site and only have to add some functionality. The problem is if you look at http://innonmainmanasquan.com/test/rates-302a.php in IE there is separations in the table, I have edited till I am blue in the face and have no Idea why it is doing this. FF displays it just fine. I have been trying to figure this out for the past 8 hours and still no dice. The code is below if someone could at least point me in the right direction that would be awsome. HTML Code: <html> <head> <title>Inn On Main Manasquan - A Unique Jersey Shore Bed And Breakfast</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="style.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .style5 {color: #FFFFFF} --> </style> </head> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <?php $page = "rooms"; $room = "302"; include('get.info.php'); ?> <div class="main"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr valign="top"> <td align="center"> <table id="Table_01" width="762" height="551" border="0" cellpadding="0" cellspacing="0"> <tr valign="top"> <td> <a href="index.php"><img src="images/Manasquan-Inn-Logo.gif" width="412" height="54" alt="home" border="0"></a></td> <td colspan="4" background="images/Jersey-Shore-Nav-Background.jpg" valign="middle"><div class="nav"><a href="location-north.php">Location</a> | <a href="accommodation.php">Rooms</a> | <a href="reservation.php">Reservations</a></div></td> </tr> <tr valign="top"> <td colspan="5"> <img src="images/Jersey-Bed-Breakfast-Establ.gif" width="762" height="25" alt=""></td> </tr> <tr valign="top"> <td width="762" height="259" colspan="5" valign="top"> <!-------------INSERTION HERE-------------> <table id="Table_02" border="0" cellpadding="0" cellspacing="0"> <tr valign="top"> <td> <img src="rooms/images/room_302-1_01.png" width="410" height="259" usemap="#Map" border="0"/> <map id="_Map" name="Map"> <area shape="rect" coords="281,210,307,235" href="rates-302a.php" alt="Image 1" title="Image 1" /> <area shape="rect" coords="312,209,336,236" href="rates-302b.php" alt="Image 2" title="Image 2" /> </map> </td> <td background="rooms/images/room_302-1_02.gif" width="352" height="259"> <div class="center7"> <p> <span class="style5"> <strong> Room 302 </strong> <br> </span> <?php echo stripslashes($returned['description']); ?> <br /> <b> <center> <?php echo stripslashes($returned['cost']); ?> </center> <br /> <center> <i> Click link for availability and best rates. </i> </center> <center> <a href="http://www.webervations.com/magic-scripts/resbook.asp?memberid=richjo" target="_blank"> <u> Check Availability </u> </a> </center> </b> </p> </div> <div class="center8"> <center> <strong> <u> Rooms </u> </strong> <br> <!--------------ROOM LINKS BELOW-------------> <a href="rates-201.php">201</a> - <a href="rates-202.php">202</a> - <a href="rates-203.php">203</a> - <a href="rates-204.php">204</a> - <a href="rates-205.php">205</a> - <a href="rates-206.php">206</a> <br> <a href="rates-207.php">207</a> - <a href="rates-301.php">301</a> - <a href="rates-302a.php">302</a> - <a href="rates-303.php">303</a> - <a href="rates-304.php">304</a> - <a href="rates-305.php">305</a> </center> </div> </td> </tr> </table> <!--INSERTION OVER------> </td> </tr> <tr valign="top"> <td colspan="5"> <img src="images/Jersey-Shore-Inn-Bottom.gif" width="762" height="25"></td> </tr> <tr valign="top"> <td colspan="2" background="images/Bottom-Left.gif" width="762" height="187" valign="top"><div class="bottom"> <div align="center"><img src="images/inn_facade.jpg" width="190" height="106" border="1"><br> <?php $query="SELECT * FROM bottomhome"; $result = mysql_query($query) or die(mysql_error()); $resultarray = mysql_fetch_assoc($result); echo stripslashes($resultarray['artist']); ?></div> </div></td> <td colspan="3" background="images/Bed-Breakfast-Manasquan.gif" width="289" height="187" valign="top"><div class="bottom"><img src="images/Inn-On-Main-Bed.jpg" width="130" height="106" hspace="10" vspace="5" align="left"><strong>Our Rooms </strong><br></span> <?php $query="SELECT * FROM bottomhome"; $result = mysql_query($query) or die(mysql_error()); $resultarray = mysql_fetch_assoc($result); echo stripslashes($resultarray['rooms']); ?><br> <a href="inn-packages.php">Click Here for More Info »</a></div></td> </tr> <tr valign="top"> <td> <img src="images/spacer.gif" width="412" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="61" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="34" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="136" height="1" alt=""></td> <td> <img src="images/spacer.gif" width="119" height="1" alt=""></td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr valign="top"> <td align="center"><span class="style4">Inn On Main - 152 Main Street - Manasquan, NJ - (732) 528-0099 - </span><a href="mailto:info@innonmainmanasquan.com"><span class="style4">info@innonmainmanasquan.com</span></a><br> <br><a href="http://www.tripadvisor.com/"><img src="http://www.tripadvisor.com/img/triplogo162w.gif" border="0" alt="TripAdvisor.com"></a> <span class="bottom"><br> Read unbiased opinions about <a href="http://www.tripadvisor.com/">hotels</a> and <a href="http://www.tripadvisor.com/">vacations</a> at TripAdvisor.</span> <br> <img src='http://counter.dreamhost.com/cgi-bin/Count.cgi?df=jcnh74-countername.dat&pad=F&ft=0&dd=C&istrip=T'></td> </tr> </table></td> </tr> </table> </div> </body> </html> CSS Code: body { background-image: url(images/Inn-On-Main-Background.gif); font-family: "Times New Roman", Times, serif; font-size: 12px; overflow:hidden; } .main{ text-align: center; padding-top: 30px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-bottom: 5px; overflow:hidden; } .main a:link{ color:#CCCCCC; text-decoration: none;overflow:hidden; } .main a:hover{ color: #999999; text-decoration: underline;overflow:hidden; } .main a:visited{ color:#CCCCCC; text-decoration: none;overflow:hidden; } .center{ color: #FFFFFF; padding: 0px; margin-top:10px; margin-left: 430px; font-size: 12px;overflow:hidden; } .packpic{ padding-top: 0px; padding-right: 0px; padding-bottom: 30px; padding-left: 0px; overflow:hidden; } .center2{ color: #FFFFFF; padding: 5px 20px 20px; margin-left: 480px; vertical-align: top; text-align: center; font-size: 12px; overflow:hidden; } .center3{ color: #FFFFFF; padding: 20px; margin-left: 480px; vertical-align: top; text-align: center; font-size: 12px; overflow:hidden; } .center4{ color: #FFFFFF; padding: 0px 20px; margin-left: 480px; vertical-align: top; text-align: center; font-size: 12px; overflow:hidden; } .center7{ color: #FFFFFF; padding: 0px; margin-left:10px; font-size: 12px; overflow:hidden; } .center8{ color: #FFFFFF; padding: 0px; margin-left: 100px; font-size: 12px; overflow:hidden; } .center6{ color: #FFFFFF; padding: -9px 20px -5px; margin-left: 480px; vertical-align: top; text-align: center; font-size: 12px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; overflow:hidden; } .nav{ color: #FFFFFF; text-align: center; padding: 5px; overflow:hidden; } .bottom { color: #082156; padding: 8px; font-size: 12px; overflow:hidden; } .bottom a:link{ color:#666666; text-decoration: none; overflow:hidden; } .bottom a:hover{ color:#666666; text-decoration: none; overflow:hidden; } .bottom a:visited{ color:#666666; text-decoration: none; overflow:hidden; } .style2 { font-size: 16px; font-weight: bold; overflow:hidden; } .style3 { font-size: 14px; font-weight: bold; overflow:hidden; } .style4 {color: #003366}.rates { color: #FFFFFF; padding: 80px 0px 0px; background-color: #666666; overflow:hidden; } .bg01 { background-image: url(images/innonmain_country.jpg); background-repeat: no-repeat; overflow:hidden; } .tbl{ width:762px; overflow:hidden; } Any help would be very much appreciated!!!!! Thanks All! Hi, not very good at HTML. Need help. Currently have laid out my site design all within a table. Inside that table there are two tables on the top side by side out of which one is aligned to the right. Below these two tables I have other tables all aligned to the left. PROBLEM The top table aligned to the right, it is 160 width pixels by 900 pixels length. I want to keep the other tables below it exactly where they are but as this table grows in length, the other tables keeps getting pushed down. Hope I am clear. Pls help. Am willing to post my html layout if need to. Tnks. Hello folks. I have this problem. I use a PHP script to echo many tables on one page. (I am posting this in the HTML forum as it requires HTML, not PHP knowledge! ). I use a class called stdDiv to get a border for the table. When I try and use <br />es and <spacer type="horizontal" size="10px" /> I do not get the effect I want. I wish for 10px between each table as described in the diagram below: However I do not get this and my table overlaps and is somehow displayed as if it is in the second row. What I get: Here is my code just for clarity: PHP Code: echo "<table class=\"stdDiv\" style=\"width:100%;\" > <colgroup><col width=\"33%\" /><col width=\"33%\" /><col width=\"33%\" /></colgroup> <tr><td colspan=\"3\" align=\"center\" class=\"title\" border=0>".$record['title']."</td></tr> <tr><td colspan=\"3\" align=\"center\" class=\"description\">".$record['description']."</td></tr> <tr><td colspan=\"3\" align=\"center\" ><img src=".$record['image']." style=\"width:128px; height:64px;\" /></td></tr> <tr><td class=\"text\" align=\"center\" style=\"border: 2px solid #999999\">Version: v".$record['version']."</td> <td class=\"text\" align=\"center\" style=\"border: 2px solid #999999\">Rating: ".$record['rating']."</td> <td class=\"text\" align=\"right\" style=\"border: 2px solid #999999\">by <b>".$record['creator']."</td></tr> </table>"; This will give out a table and it is executed with every looping. I want to know how or what code to insert to create a gap of 10px between it and the next time I want to output a table Regards and thanks in advance, mintsmike |