HTML - Confusion With Alignments
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. Similar TutorialsHi all, I'm working on a website, and i'm trying to have it so that two pieces of text are aligned in a <td> one to the left and one to the right. However, no matter how hard i try I cannot get it to work! The closest i have got is to have both the texts in but it forces it to go on a line above. I won't post the url to the site unless someone asks, as I will probably be banned for spamming, but please help! Hello I am creating a table of contents using the <p> tag for each title. Each title is clickable and takes you to a section of the website relative to the title clicked. My problem is that I want everything to line up nicely and this is problematic using the <p> tag - for example: ARTICLE 1 - BLAH BLAH BLAH BLAH ARTICLE 10 - BLAH BLAH BLAH BLAH I want to look like this. (Actually scratch that this forum suffers the same problem I get when trying it on my own site, but you can comprehend what I'm talking about =] ). I realize there are cheap fixes such as just adding a bunch of spaces and what not but it still doesn't work. I could explain why but just trust me it doesn't work. My idea was to just use a table with 2 columns: 1 column = ARTICLE # - 2 column = BLAH BLAH BLAH however I can't extend a clickable title across 2 columns. Also I should note that I'm using DRUPAL. Thanks for your time. 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 I 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 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! 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. 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 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! 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, 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 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 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! |