HTML - Basic: Table Placement And Boxes
I know these are pretty easy questions, but I don't know that much about html and I couldn't seam to find the answer on w3 or anywhere else.
NOTE: This it mainly for html, but if you have a solution in javascript or css, that would be fine. 1. How do you place a table (single celled) at a set distance from the left side and top of the page? 2. How do place a box (with a set color, thickness etc.) anywhere on the page (the same way as the table)? I know I could use the table thickness, but I like it set to "0" because I don't like its border look. Help please, thanks. Similar TutorialsOkay, well lately I've been really into making HTML layouts. To make sure you know exactly what I'm talking about, you can view one I found at the following adress : http://www.horse-lover-layouts.com/p...dow_paints.htm I want to be able to make boxes like that, and also seperate columns, and rows. The code below is the current one I've been using, and I can't figure out what's wrong with it. When I would type in it, and press enter, it would go down a line. All it did was keep going. Another thing, I can't place them for the life of me, like I can't put them somehwere specific. Could you help me out a bit with that? HTML Code: <DIV style="TEXT-ALIGN: left; WIDTH: 100%; FONT-FAMILY: arial; HEIGHT: 100%; COLOR: #cb642d; FONT-SIZE: 9pt; OVERFLOW: auto"> <DIV><BR> <H5>Title goes here</H5> <P>Body here Body here Body here Body here Body here Body here Body here Body here Body here Body here Body here Body here Body here Body here Body here Body here Body here Body here Body here Body here Body here Body here Body here v </ P> <P></P></DIV><BR> Hey guys, I customized a table & banner to include a 768x90 advertisement, and it looks fine (tested in Firefox & IE8) in the file I created: http://www.sidelinescouting.net/index7.shtml However, when I try to transfer this header to the main pages, the banner doesn't align anymore. Here's what it looks like when I do that: http://www.sidelinescouting.net/index-bad.shtml There are 3 things I notice: 1) 768x90 is misplaced, obviously (in both browsers) 2) Navigation drop-down raises higher, too close to banner, which may be a result of #3 he 3) Image starts to repeat (Copyright disclaimer shows up twice, should just be up top) Any help is appreciated! This forum has always been good to me. Im in the process of redoing my website. I originally did it in dreamweaver with a very cheesy method of just using hotspots. So Im going through and redoing it by hand in html. Im doing the index page right now and playing around with the idea of having the whole page in one table. My problem is the table isnt starting in the top left corner where I want it. I have the border set to "0" but theres still space around the table. How do I get rid of this space? hey guys - I was trying to add a little more kick to my website today and making the text appear in little windows I guess you would say - (I know the site is not complete and links are intentionally broken) if you look on the right of the page you will notice I added 2 table cells to round off the white - now the problem I can not figure out how to bring the white area over to the rounded edges whether I need to make the cell wider or if I need to add another cell - any help is appreciated. source: Http://www.medicalpracticeexams.com/index.asp Thanks hi, I'd like to say that I'm extremely new to xhtml and CSS, so please bare with me. My question is simple, consider I have this code HTML Code: <table class="mainTable" border="0" cellspacing="30"> <tbody> <tr> <td> <p><b><a class="button" href="l1.html" target="_blank">Link1</a></b></p> </td> <td> <p><b><a class="button" href="l2.html" target="_blank">Link2</a></b></p> </td> <td> <p><b><a class="button" href="l3.html" target="_blank">Link 3</a></b></p> </td> <td> <p><b><a class="button" href="l4.html" target="_blank">Link 4</a></b></p> </td> </tr> </tbody> </table> 1) what does target="_blank" mean? 2) My intention is to place this table in the upper center of the screen. How can I center the table ? 3) The height on each cell in this table is huge, how can I decrease the height of the cells? Thanks Okay, it was all working great until I wanted to add another column to make the center logo clickable. Now I am having the problems with the little images being slightly out of alignment again. Any help would be greatly appreciated! The web address is: http://radarcartoons.com/test/test.html Here is the source code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> Radar Cartoons </title> <style type="text/css"> * { margin: 0; border: 0; padding: 0; } body { background: #000000; text-align: center; } #wrapper { width: 1101px; margin: 0 auto; }</style> </head> <body><br /> <br /> <div id="wrapper"> <table cellspacing="0"> <tbody> <tr> <td><img src="1.jpg" alt="1" /></td> <td><br /> </td> <td><a href="/shows.html" onmouseover="document.circle1.src='2_lit.jpg'" onmouseout="document.circle1.src='2.jpg'"><img src="2.jpg" alt="Shows Page" name="circle1" height="161" width="145" /></a></td> <td><img src="3.jpg" alt="3" /></td></tr></tbody></table> <table cellspacing="0"> <tbody> <tr> <td><img src="4.jpg" alt="4" /></td> <td><br /> </td> <td><a href="/news.html" onmouseover="document.circle2.src='5_lit.jpg'" onmouseout="document.circle2.src='5.jpg'"><img src="5.jpg" alt="News Page" name="circle2" height="151" width="140" /></a></td> <td><img src="6.jpg" alt="6" /></td></tr></tbody></table> <table cellspacing="0"> <tbody> <tr> <td><img src="7_1.jpg" alt="7_1" /></td> <td><a href="/info.html"><img src="7_2.jpg" alt="7_2" /></a></td> <td><a href="/credits.html" onmouseover="document.circle3.src='8_lit.jpg'" onmouseout="document.circle3.src='8.jpg'"><img src="8.jpg" alt="Credits Page" name="circle3" height="148" width="148" /></a></td> <td><img src="9.jpg" alt="9" /></td></tr></tbody></table> <table cellspacing="0"> <tbody> <tr> <td><img src="10.jpg" alt="10" /></td> <td><br /> </td> <td><a href="/links.html" onmouseover="document.circle4.src='11_lit.jpg'" onmouseout="document.circle4.src='11.jpg'"><img src="11.jpg" alt="Links Page" name="circle4" height="137" width="137" /></a></td> <td><img src="12.jpg" alt="12" /></td></tr></tbody></table> <table cellspacing="0"> <tbody> <tr> <td><img src="13.jpg" alt="13" /></td> <td><br /> </td> <td><a href="/contact.html" onmouseover="document.circle5.src='14_lit.jpg'" onmouseout="document.circle5.src='14.jpg'"><img src="14.jpg" alt="Contact Page" name="circle5" height="133" width="126" /></a></td> <td><img src="15.jpg" alt="15" /></td></tr></tbody></table></div> </body> </html> I am trying to create a table that looks like the following: _____________ |_______|____| |___________ | |___|________| Here is the code I am using: HTML Code: #mainTable { width: 100%; padding: 0; margin: 0; } #headerLeft { padding: 10px 0 10px 10px; width: 606px; } #headerRight { margin-top: 25px; text-align: right; white-space: nowrap; } .orangeBar { margin: 0; padding: 0; font-size: 8px; background-color: #FFC342; } #navCell { width: 225px; vertical-align: top; } #contentCell { width: auto; vertical-align: top; } <table id="mainTable" border="1"> <tr> <td id="headerLeft" colspan="2"><img src="images/logo.gif" width="596" height="60" alt="Our Logo" /></td> <td id="headerRight">Nav Links</td> </tr> <tr> <td colspan="3"><p class="orangeBar"> </p></td> </tr> <tr> <td id="navCell">Nav</td> <td colspan="2" id="contentCell"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In a sem. Integer mattis justo eu nunc.</p> </td> </tr> </table> For some reason, the Nav cell in the last row is taking on the width of the image in the first cell, even though I want it to be 225px wide. I want the table to be the width of the page (100%). Anyone have any ideas? I know it can be done by nesting two tables, I was just trying to avoid that. Thanks! Just a quick edit, I added a bg color to headerLeft. Then I tested my code with the image removed, and the layout works they way I want, but as soon as I put it back, it is messed up again! The bg color I added confirms that the cell is the same size with and without the image. Hi everyone, I am having a basic problem with a header for my site. The header template is a 3 column 4 row table, with various graphic pieces plugged into each cell. On the second row, I have a graphic that is as wide as the 2nd column plus the 3rd column, and I used the colspan command so it should take up both columns. But, there is a goofy gap to the left of it! Can anyone help? The website is www.precisionpythons.com Thank you! JonV I'm creating a form framed in a table. I want to have 2 textboxes and 1 select box in one row of the table. The Last Name, First Name and Age. When I create the row the fields are fine, but there's spacing after each field that I need to decrease in size to allow everything to fit correctly. Here's the code I have right now Code: <table summary="form" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> <input type="text" name="childlname" value="" size="20"> </td> <td> <input type="text" name="childfname" value="" size="20"> </td> <td> <select name="childage" align="right" width="5"> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> </select> </td> </tr> </tbody> </table> Thank you in advance for any help Mike Hello, I have 6 Div's that i need placed one below the other. 3 of the Div's are invisible from the start, so I want the ones below it to take their spot so there's not a big white space where they're gonna be. Right now all the div's are just on top of each other and it's a mess. How would i format the div's so they're stacked? Thanks! Hi, Let say i want to place a div element 20px from the top vertically and 400px to the right from the center of the webpage, how would I do that? I tried <div style="position: absolute; top: 20px; left: expression(document.body.clientWidth / 2 + 400px); >div content</div> but it's not working. Can someone help me. Thanks Hi, I'm working on trying to build my website with images. The problem that I'm having is that the image for the main part of the website is automatically moved down instead of aligning to the top. I would like a little bit of space between the top and the image, but not so much that it causes the website to have to vertically scroll, as it currently is. Here is a screenshot of the problem: http://img247.imageshack.us/img247/3064/screenvp2.jpg If you want to see the website, go here and click on the image in the middle: http://katelphotography.com/popup.html And here is the code I'm using, if that would be helpful. Thanks! HTML Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>k a t e L p h o t o g r a p h y</title> <style type="text/css"> <!-- body { background-color: #FFFFFF; } .style6 { color: #D9ECBB; font-size: x-small; } .style11 {color: #DEF0C6; font-family: Arial, Helvetica, sans-serif;} --> </style> </head> <body background="http://img360.imageshack.us/img360/9241/backgroundmo6.jpg"> <div align="center"><br> <br> <br> <br> <img src="http://img119.imageshack.us/img119/8839/71647178vd9.jpg" width="934" height="679" border="0" usemap="#Map"> <map name="Map"> <area shape="rect" coords="-6,251,92,266" href="photogs.htm"> <area shape="rect" coords="-4,230,95,246" href="me.htm"> <area shape="rect" coords="0,291,92,307" href="pricetag.htm"> </map> <br> <br> <br> <span class="style6"></span></div> </body> </html> www.onlineeire.com I am looking to put my adsense code on the far right of the mainpage. Can someone please write this for me as I dont seem to be able. Adsense Code: <script type="text/javascript"><!-- google_ad_client = "pub-4509855354636499"; /* 600x120, created 22/01/08 */ google_ad_slot = "5686969599"; google_ad_width = 120; google_ad_height = 600; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> Thanks very much in advance. Hi, I want to place an image on the bottom right corner of the table box and I want to wrap the text with image. For example: some text some text some text some text some text some text some text some some text some some text some some text some some text some Now this bottom right corner which is blank i want to put image in this area, how can i do this, this is all a table column. Please help thanks I want to put few ads on the given pciture(Attached) but when i do that then one extra space gets created whcih looks bad. I exactly wanna put ad there. Help me there. I m putting source code of my web site.. you can also check my site at www.nutraforum.com Please tell me how to put code and where so and whcih tag shd be added to get my ad there. I will be greateful if you check the sourc code of my forum. i m not abl to put souce code as forum allows only 10000 char . I am trying to place images along the left and right sides of my page with text running down the center. However, the images in IE tend to line up in the middle with the text but everything is fine in FF. Code: <p class="style3" align="center"> </p> <p align="center"><a href="R100.html">R100</a><a href="FB2.html"><img src="images/FB2.png" alt="FB2" align="right" height="310" width="317" /></a><br /> <a href="ER.html"><img src="images/ER.png" alt="ER" align="left" height="310" width="310" /></a><a href="ER.html">ER</a><br /> <a href="ER-R.html">ER-R</a><br /> <a href="EP.html">EP</a><br /> <a href="EC.html">EC</a><br /> <a href="EC-R.html">EC-R</a><br /> <a href="E3.html">E3</a><br /> <a href="E3-R.html">E3-R</a><br /> <a href="FK.html">FK</a><br /> <a href="FK-R.html">FK-R</a><br /> <a href="GK.html">GK</a><br /> <a href="GT.html">GT</a><br /> <a href="KS.html">KS</a><br /> <a href="GS.html">GS</a><br /> <a href="FB2.html">FB2</a><br /> <a href="HB2.html">HB2</a> <br /> <a href="IB2.html">IB2 </a></p> <p class="style1" align="center"> </p> <p class="style1" align="center"><a href="4-Pole.html">- 4-Pole Alternators - General Information -</a></p> Okay so hello everyone, my names chris. I recently decided I was going to do web hosting, and had a friend start building me a template since I lack html. But he only created me a nice background image to add onto. So I centered it on the page and started adding "Draw AP Divs" onto it. At first I had the images perfectly aligned in my firefox browser and I was ready to continue adding stuff to it, however, the images are misplaced in everyone elses browsers (i.e and firefox) And I'm completely clueless on how I can get the images properly aligned in there spots for both browsers.. As you can see there not aligned in that view (internet explorer) but in firefox there fine.. and when I fix them to look right in internet explorer, they mess up in firefox. I'm at a loss. Heres the code if you want it to be posted he Code: <!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=utf-8" /> <title>***aS Hosting</title> <style type="text/css"> <!-- body { background-color: #000000; } #apDiv1 { position:absolute; left:153px; top:122px; width:418px; height:234px; z-index:1; } #apDiv2 { position:absolute; left:95px; top:310px; width:56px; height:48px; z-index:1; } #apDiv3 { position:absolute; left:496px; top:306px; width:223px; height:30px; z-index:1; } .style2 { color: #CCCCCC; font-weight: bold; } #apDiv4 { position:absolute; left:496px; top:359px; width:401px; height:256px; z-index:2; } .style3 {color: #CCCCCC} #apDiv5 { position:absolute; left:234px; top:318px; width:140px; height:149px; z-index:3; } #apDiv6 { position:absolute; left:237px; top:508px; width:138px; height:150px; z-index:4; } #apDiv7 { position:absolute; left:907px; top:36px; width:137px; height:15px; z-index:5; } .style4 { color: #FFFF00; } #apDiv8 { position:absolute; left:511px; top:181px; width:145px; height:25px; z-index:6; } .style6 {color: #666666} #apDiv9 { position:absolute; left:712px; top:219px; width:160px; height:22px; z-index:7; } #apDiv10 { position:absolute; left:851px; top:247px; width:140px; height:19px; z-index:8; } #apDiv11 { position:absolute; left:851px; top:280px; width:141px; height:20px; z-index:9; } #apDiv12 { position:absolute; left:854px; top:312px; width:138px; height:21px; z-index:10; } a:link, a:visited, a:hover { text-decoration: none; } .style7 {color: #FF00FF} #apDiv13 { position:absolute; left:748px; top:21px; width:291px; height:171px; z-index:5; } #apDiv14 { position:absolute; left:916px; top:29px; width:105px; height:15px; z-index:6; } #apDiv15 { position:absolute; left:919px; top:54px; width:106px; height:16px; z-index:7; } #apDiv16 { position:absolute; left:777px; top:87px; width:43px; height:17px; z-index:8; } #apDiv17 { position:absolute; left:920px; top:81px; width:106px; height:16px; z-index:8; } #apDiv18 { position:absolute; left:918px; top:105px; width:107px; height:15px; z-index:9; } #apDiv19 { position:absolute; left:919px; top:129px; width:108px; height:15px; z-index:10; } #apDiv20 { position:absolute; left:918px; top:154px; width:106px; height:15px; z-index:11; } --> </style></head> <body> <div class="style2" id="apDiv3">November 02, 2007</div> <div class="style3" id="apDiv4"> <p>Text</p> <p><br /> </p> </div> <div class="style3" id="apDiv5">Text</div> <div class="style3" id="apDiv6">Text</div> <div id="apDiv13"></div> <div id="apDiv14"><img src="home.jpg" width="45" height="14" /></div> <div id="apDiv15"><img src="aboutus.jpg" width="67" height="14" /></div> <div id="apDiv17"><img src="support.jpg" width="61" height="13" /></div> <div id="apDiv18"><img src="hostingplans.jpg" width="100" height="14" /></div> <div id="apDiv19"><img src="links.jpg" width="42" height="14" /></div> <div id="apDiv20"><img src="controlpanel.jpg" width="103" height="14" /></div> <div align="center"><img src="back.jpg" width="825" height="800" /></div> </body> </html> Any help is great.. and appreciated. Hi newbie here, hope you can help. I need my buttons to be sitting side by side horizontally but not sure what code should be added to do so. At the moment they are sitting vertically. It appears that the </FORM> at the end of each line creates a BR. Here is example of the code, obviously the urls are fictitious <FORM METHOD="LINK" ACTION="http://joebloggs.com/"> <INPUT TYPE="submit" VALUE="sausages"></FORM> <FORM METHOD="LINK" ACTION="http://fredbloggs.com/"> <INPUT TYPE="submit" VALUE="pies"></FORM> <FORM METHOD="LINK" ACTION="jimmybloggs.com/"> <INPUT TYPE="submit" VALUE="meatballs"></FORM> What do I need to edit to enable the buttons to be horizontally placed. Thank you Jim Hello, This is the site in question: www.hbcacworth.org I would like to place a small rectangular logo on the right side of the page on the same line as the church logo which is already there. I cannot figure out how to do this. Does anyone have any suggestions? Thank you so much. bt |