HTML - Html (or Css) Table Align Problem
Hi there,
After HOURS of battling with what I thought should be so simple I have given up and registered for help! The very basic form of my problem is I want a table with 3 cells, The first two cells (one black, one blue) I want to be left aligned and simply as wide as the cell contents. I then want the 3rd cell to be right aligned, and fill up the rest of the row before reaching the text. So the 3rd cell spans from the 2nd cell all the way to the right of the table. I have uploaded 2 images. One is the rough design that I'm trying to achieve, the other shows my results. what I want: http://imageshack.us/photo/my-images/705/hopez.png/ (the 'music videos' would be in a separate cell as the background will be blue as you can see in my tests below) actual: http://imageshack.us/photo/my-images/830/problemue.png/ It either ends up as above or with hours of fiddling I did somehow have it over at the right, but only behind the text was black, there was just open space between the blue cell and the right aligned cell. So frustrated, better go to bed, haha. Similar TutorialsOk, i have a table and there two images in two different frames next to each other. Sence one is taller than the other, the smaller one is centered in the middle of the <td> I want to have the tops of the images aligned, do you know how to do that? Hello everyone, I've been racing to learn html/css in the past couple weeks to throw up a website, and so far so good. But: I've searched the internet and I cannot find an answer to my questions. The page in question is: http://www.andrew.cmu.edu/user/jonmille/projects.html style sheet (relevant section is in the "Programming: List Settings" section) http://www.andrew.cmu.edu/user/jonmille/style.css You can see that the gray borders under the text/images have a small break in them. I assume it has something to do with the fact that I'm using two columns. How do I fix this and make a solid border (in a non hackish way)? Note: if you say "use css/divs," I wrestled with those for about two hours before I gave up and made a table. Secondly, in IE7, all the images/text are completely flushed left, ignoring the table padding. How can I fix this? Note, I've never checked this site in IE6 or below, and never will, so if it looks wrong in IE6, then the user doesn't deserve to see my site anyway. Thanks for your time! Jon Not a major programmer but I needed to make a website. I am having a problem with my website where I have 5 pages, same structure, built with tables, all tables centered. In IE the tables align center on each page. But in Firefox --- 3 of the pages are different, lining up about 10 pixels left of center. Does anyone know how I can fix this problem? I have browsed around other sites as well and many of them have this problem. Any advice would be greatly appreciated. I know tables are horrible but thats all I know/can learn. Im trying to create a table for ebay use, i created pic for top left, top right, bottom left and bottom right. 1 also created pic for top middle (the middle part should be changeable- it can get longer or shorter same with the middle bottom and left and right middle pics) but the problem is i dont know how to make the right and left middle to repeat itself, also i dont know the correct HTML code to set the right middle picture in its rightful place. Im new in creating HTML, my goal is to have a table border that has a fixed size on all corners except for inbetweens - i want them stretching. i would appreciate some tips. Thanks HTML Code: <TABLE style="BORDER-RIGHT: #fff 3px solid; BORDER-TOP: #fff 3px solid; BORDER-LEFT: #fff 3px solid; BORDER-BOTTOM: #fff 3px solid" cellSpacing=0 cellPadding=0 width="95%" align=center> <TBODY> <TR> <TD vAlign=top align=left><img src="http://img222.imageshack.us/img222/8549/topleftea0.gif"></TD> <TD vAlign=top width="100%" background="http://img242.imageshack.us/img242/6443/topmiddleeq0.gif"></TD> <TD vAlign=top align=right><img src="http://img222.imageshack.us/img222/5030/toprightqx9.gif"></TD> <tr><td style="background:transparent url(http://img242.imageshack.us/img242/3990/leftframeru4.gif) left top;" valign="bottom"><img src="http://img242.imageshack.us/img242/3990/leftframeru4.gif"></td></TR> <tr><td style="background:transparent url(http://img364.imageshack.us/img364/4470/rightsidetq1.gif) right top;" valign="bottom"><img src="http://img364.imageshack.us/img364/4470/rightsidetq1.gif"></TR></TD> <TR> <TD vAlign=bottom align=left><img src="http://img242.imageshack.us/img242/4265/lowerleftqo9.gif"></TD> <TD vAlign=bottom width="100%" background="http://img242.imageshack.us/img242/1425/lowermiddlepn7.gif"></TD> <TD vAlign=bottom align=right><img src="http://img242.imageshack.us/img242/4020/lowerrightwo9.gif"></TD> Hi All, I am newbie with HTML, I am having difficulties in nesting the tables. I have 4 <TD> tags in a <Table> but somehow due to some nesting issues when i am inserting a table in my 3rd <TD> my 4th <TD> goes out of the table. Here goes my Code... ------------------------------------------------------------------------------------------------------- <HTML> <BODY> <table border=1 width="100%"> <tr> <td>1st TD</td> <TD>2nd TD</td> <td>3rd TD <table> <tr> <table> <tr> <td>Info</td> <td>S/O</td> </tr> <tr> <td><select><option>Info about Renting</option></select></td> <td><input type="text" style="width:70px"></td> </tr> <tr> <table width="50%"> <td></td> <td>ABC</td> <td>DEF</td> <td>GHI</td> <td>JKL</td> </table> </tr> <table> </tr> </table> </td> <td>4th TD</td> </tr> </table> </BODY> </HTML> -------------------------------------------------------------------------------------------------------- Please Help!!!... -Gagan Hi, Im very new to php and mysql coding. Im trying to make support system for a basketball fantasy website where it predicts the player's next games fantasy pts. The tables consists of a number of columns; Game, OFF, DEF, REB, AST, STL, BLK, TO, PF and PTS. There is a number of rows that contains the values of these columns. I want to write some code that takes these values and multiple them with a value and add them to next column. So it like formula for example; Game|OFF|DEF|REB|AST|STL|BLK|TO|PF|PTS 1 | 1 | 0 | 2 | 1 | 3 | 1 | 0 | 2 | 6 2 | 2 | 0 | 2 | 1 | 3 | 1 | 0 | 2 | 6 The Formula would be (OFF *0.5) + (DEF*0.5) etc and place the result in column called FantasyPTS. So the resulting table would be like this; Game|OFF|DEF|REB|AST|STL|BLK|TO|PF|PTS |FantasyPTS 1 | 1 | 0 | 2 | 1 | 3 | 1 | 0 | 2 | 6 | ? 2 | 2 | 0 | 2 | 1 | 3 | 1 | 0 | 2 | 6 | ? Thank you in advance Hey guys, Okay so here is what I am trying to do. I am populating a table with some info from a database. The data should look something like this. Recipe Name - Prep Time - Total Time- Rating ============================ test data here 12 mins 15 mins 4.5 test data here 12 mins 15 mins 4.5 test data here 12 mins 15 mins 4.5 test data here 12 mins 15 mins 4.5 The names of the recipe is what I want to create as links so that when the user clicks on a certain RECIPE NAME another page will open showing only the data that goes with that recipe he/she clicked on. So far I have not gotten my code to work correctly, i dunno if i am missing something or doing it all wrong? I am using a while loop to generate all the recipes form the database. Again, i want the names of the recipes to be the links. Please help me!!!! Thanks for your time and help Here is my code: <? while( $row = mysql_fetch_array( $result ) ) { ?> <tr> <a href="ShowRecipe.php?id=<?=$row['id']?>"></a> <td><?=$row['name']?></td> <td><?=$row['preptime']?> mins</td> <td><?=$row['totaltime']?> mins</td> <td><?=$row['rating']?></td> </tr> <? } ?> Hello everyone. Im new to forums and am looking for some help my my html. I am having problems with the alignment of my tables. They used to align perfectly but are now being stretched the length of the page. It has to do with my TD somewhere but I can't find it. If you check this code you'll see what I mean. Im not sure what I did but it never had this problem before. Let me know what you guys think. Thanks Hi, I'm having a basic problem with a HTML table. It displays exactly how I want on Firefox 3.5.15 but on Internet Explorer 8 is does not. Can anyone point out what I need to do to get this table displaying in IE as it does in Firefox? Below is my HTML table and I suspect IE 8 is ignoring 'rules = rows'; <?php echo '<TABLE bordercolor=#000000 cellspacing=0 cellpadding=10 border=0 rules=rows frame=box width="90%">'."\n"; echo '<tr>'; echo '<td><B><font size=1>Test Name</font></B></td><td><B><font size=1>Date</font></B></td><td>'; echo '</tr>'; echo '<tr>'; echo '<td><font size=1>Test Number 1</font></td><td><font size=1>01/01/2010</font></td>'; echo '</tr>'; echo '<tr>'; echo '<td><font size=1>Test Number 2</font></td><td><font size=1>02/01/2010</font></td>'; echo '</tr>'; echo '<tr>'; echo '<td><font size=1>Test Number 3</font></td><td><font size=1>03/01/2010</font></td>'; echo '</tr>'; echo '<tr>'; echo '<td><font size=1>Test Number 4</font></td><td><font size=1>04/01/2010</font></td>'; echo '</tr>'; echo '<tr>'; echo '<td><font size=1>Test Number 5</font></td><td><font size=1>05/01/2010</font></td>'; echo '</tr>'; echo '<tr>'; echo '</TABLE>'."\n"."\n"; ?> Thanks! Hi all, I love the design of this forum. I have a very annoying HTML problem and really need help. Would REALLY appreciate it. On some of the pages there's too much space between the table cells. I've tried EVERYTHING and couldn't find the source of the problem. Take it as a challenge and please help... Try this: http://www.canaseed.com/Search.aspx?search=csdc I've attached a gif file that describes the problem. Thank you so much for your help... Hello Everyone! (hoping for quick reply.. lol) I am not sure if this should go here, or in the design section. I chose here, because it is a problem in the code itself. I have introduced myself in the introductory section, if you want to know a little bit more about what I am doing this for. I made a template design in The Gimp photo editor. I sliced it up, and opened up the HTML file in the editor Kompozer. It opened up just like it should, but I wanted a liquid type layout, so I turned the cell's widths into the corresponding percentages, though Kompozer rounded them off. (Shown below) However, when I previewed the file this time, it appeared as if it skipped every other cell, leaving a blank white space in its spot. Not even in the right percentages. I think I know what I've done wrong, looking back now that I am writing this thread. Can someone please point me in the right direction? EDIT: Code posted as comment, due to lack of character room. Hi guys, I am building web for friend and I have problem with aligning my div table on my sidebar. The sidebar needs to be on top of the page and i can't get it up there here is the website: herehere and here is my html where you can see how i have set up the divs : herehere If you can help me that will be grate. I NEED HEEEEEEELP Thanks Okay so I'm making a mock up sign in and log in page and this is what I want to happen but since it only has 2 columns, the log in page gets drag on the middle. i want it to look like this: I need 2 to go to the top like 4 is, and then 1 to go right below 2, etc. Photo below. Hi All, Am a bit of a newbie here. I'm having a little problem with a table that I created on Wordpress. After creating the table, the image below shows how it looks like on the Wordpress editor: But, once published, the row alignment is a bit off. Here's the url: http://runfest.my/?page_id=346 Appreciate some advice on what went wrong and how I can fix it. Thanks a bunch! I have a table that is saved from Photoshop. It's a table with a load of cells inside. How can I vertically center the table? Not its content, I mean the actual table itself so it centers itself no matter the resolution of the screen it's being displayed on. Thanks, Simon If I have a table that has 2 columns and the second column has 1 row (rowspan="2") and the first column has 2 rows, how can I keep the rows in the first column aligned top regardless of the height of the second column? Thanks~ I have a logo image and a table (being used as a nav.) I want the table to be centered vertically on the right side of the logo. Here is what I have so far: css: HTML Code: body .logo {position:absolute; } table {width: 65%; margin: 20px auto 0px auto; border-bottom: 3px solid #3399cc; } html: HTML Code: <div> <div id="Drafting & Design Logo" class="logo"> <img src="menu/Logo.png" height="155" width="139"> </div> <div> <table> <tr> <td width=18.3%><a href="#" id="drafting" target="_new" /></td> <td width=25%><a href="#" id="programming" target="_new" /></td> <td width=18.3%><a href="#" id="resume" target="_new" /></td> <td width=18.3%><a href="#" id="contact" target="_new" /></td> </tr> </table> </div> </div> I want the entire thing centered in 65% of the browser window. Right now the image off to the left and the table is centered. When I change the margins on the image it doesn't do what I would like it to. Also, the reason I don't add it to the table is because I want to have a line under the nav bar stopping at the logo. Any help would be greatly appreciated. http://sugarbat.org/plugboard The table wont align with the image. Why? I'm building my website and I've just noticed that the left bar has suddenly shifted away from the left edge of the screen. I have no idea what I did to cause this and can't seem to fix it. In an attempt to figure out which bit is wrong I have cut back all the rubbish until I'm just left with a basic left aligned table - Code: <html> <body> <table width="90%" border="1" align="left"> <tr> <td> XXX </td> </tr> </table> </body> </html> Now that's pretty simple. can't get much more cut down than that - a left aligned table. The left alignment is working such that the table is to left of centre, but the problem is that (on my system at least) the left edge isn't butted up against the left edge of the browser. So what the heck is the problem? |