HTML - Positioning Multiple Javascript Elements
if you go to my website, http://www.freewebs.com/rollingdice/index.htm, you'll see that there is a single rss feed from googles Sci/Tech section. I also have an rss feed from HackADay.com but for some reason i can't get it to display correctly when i try to position it. I've tried everything from making a div around the javascript element to giving it an id and setting positioning in a css file. If i dont have the id or div around it the hackaday rss would just display under the google rss in a very slopy way.
Can anyone help me out? Similar TutorialsHi, I am looking for some insight on this matter. I currently convert images to html by using fireworks to slice up td backgrounds. and then position elements on an overall table with invisible image spacers. This is very time consuming.. I am looking for an easier way to convert images to html. Is there a program that will let me accomplish this easier? I dont want to use invisible images any more. Any advantages / disadvantages in using either approach? I am looking for a program that will be wc3 compliant and multi browser compatible. Thanks for your input. Hi: I would like the freedom to position <input> elements of a form to specific places on my page. What is the proper way to do that please ?? Thanks, -Mel Smith Could you have multiple http-equiv meta elements in one index.htm file, such as: Code: HTML Code: See what I am trying to do here is keep the charset the same, but also have search engines expire the current cache for this site as I have made many changes to my website. It is currently still under construction and I was wondering if this is the best way to "re-cache" the new content. Specifically, the title, description and keywords meta elements. Any assistance with this would be greatly appreciated. I am trying to set up a contact form for a website I am building. We will be posting a couple of the messages we recieve on different pages on the site. To avoid having too many contact forms, we've lumped them all together into one, using a Drop Down Form Element. I am trying to set it up so that when certian elements are selected from the "Who would you like to contact?" dropdown menu, a check box will come up saying wheather or not they mind us posting their message on the site. I'm attempting to do this using Java Script and this is the code i've been using... PHP Code: <script language="javascript"> function enableaccept() { var who = document.theForm.elements['who'] var accept = document.theForm.elements['accept'] if (who.value=="N") { accept.disabled = true } else { accept.disabled = false } } </script> and in the dropdown menu, this is how i have set it up to work... PHP Code: Who would you like to contact?<br> <select size="1" name="Who"> <option></option> <option value='n' onClick="enableaccept()">__________</option> <option value='y' onClick="enableaccept()">Testimonials</option> <option value='y' onClick="enableaccept()">Praise Reports</option> <option value='y' onClick="enableaccept()">Request Prayer</option> <option value='n' onClick="enableaccept()">Booking Information</option> <option value='n' onClick="enableaccept()">Technical Support</option> </select> (The _________ is where a name should go that I chose not to put out on the forums, no offense to anyone...) For some reason, the check box is still enabled no matter what, and I'm so utterly confused...I'm still rather new to Javascript, so there may be something wrong with my coding, but it all seems that it would make sense...if you could help me out, that would be greatly appreciated In Christ Alone, Fire Fall D0wn How do I make element's change their height automatically depending on whether they have anything contained within them? My page background is a div's bg image but the div hasn't expanded to the size of the contained elements. The div's name is nicola-bg Here is the site I have the same problem too with #image-section. That div is styled to have large borders but the borders don't extend to the height of the div's containing elements. Please help. This is what I have so far http://bartletagency.com/m/x2.php Now, obviously with business cards there many different options. I need something to calculate on the side the total after picking each drop box option, or if easier, after hitting "calculate total." (preferably with the numbers in a table so I can make it appear by itself right underwear the send button) . Example: 1000 business cards in blue, say, would need to come up at 50 dollars if they pick 3-1, but if they pick 3-22 it needs to come up 60 dollars if they pick the other color, green, and pick 3-1, the label would need to turn to $55.00, if they pick 3-2 with the color green the label would need to say $65.00 how can i do this please? here is the code I have which made up the PHP file i linked you to above. code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> <title>Lesson 3</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php if ($_SERVER['REQUEST_METHOD'] != 'POST'){ $me = $_SERVER['PHP_SELF']; ?> <h1 align="center">Business Cards</h1> <form name="form1" method="post" action="<?=$me?>"> <table border="0" align="center" cellpadding="5" cellspacing="0"> <tr> <td align="right" valign="middle">Quantity:</td> <td><select name="Quantity: "> <option value="1000">1000</option> <option value="2500">2500</option> <option value="5000">5000</option> <option value="10,000">10,000</option> </select> </td> </tr> <tr> <td align="right" valign="middle">color</td> <td><select name="color"> <option value="blue">blue</option> <option value="green">green</option> </select> </td> </tr> <tr> <td align="right" valign="middle">3</td> <td><select name="3"> <option value="small">3-1</option> <option value="medium">3-2</option> </select> </td> </tr> <tr> <td> </td> <td><input type="submit" name="Submit" value="Send"> </td> </tr> </table> </form> <?php } else { error_reporting(0); // initialize a array to //hold any errors we encounter $errors = array(); // test to see if the form was actually // posted from our form $page = $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; if (!ereg($page, $_SERVER['HTTP_REFERER'])) $errors[] = "Invalid referer<br>\n"; // check to see if a name was entered if (count($errors)>0) { foreach($errors as $err) echo "$err<br>\n"; echo "<br>Please use your browser's Back button to fix."; } else { // no errors, so we build our message switch($_POST['color']){ case 'red': $recipient = 'mathew420@gmail.com'; break; case 'green': $recipient = 'mathew420@gmail.com'; break; case 'blue': $recipient = 'mathew420@gmail.com'; break; default: $recipient = 'mathew420@gmail.com'; } $subject = "Widget On Line Order"; $from = stripslashes($_POST['Name']); $msg = "Message sent by $from\n"; $msg.="\nSize: ".$_POST['size']; $options=$_POST['options']; $msg.="\nOptions:"; if ($options) for ($i=0;$i<count($options);$i++) $msg.= "\n- $options[$i]"; else $msg.="\n- None"; $msg.="\nColor: ".$_POST['color']; $extension=($_POST['extension'])?"Extension: Yes":"Extension: No"; $wallmount=($_POST['wallmount'])?"Wallmount: Yes":"Wallmount: No"; $deskmount=($_POST['deskmount'])?"Deskmount: Yes":"Deskmount: No"; $msg.="\n$extension\n$wallmount\n$deskmount"; $msg.="\n".stripslashes($_POST['MsgBody'])."\n"; if (mail($recipient,$subject,$msg)){ echo "<p>Thanks for your order!</p>"; echo nl2br($msg); } else echo "An unknown error occurred."; } } ?> </body> </html> thanks so much Hey guys and thanks in advanced for helpin' me out with this one. Anyways, I'm building a sort of "Advanced" search functionality. I want to give the user the ability to select multiple checkboxes in different categories (forms) but to be able to account for each checkbox even though they are in different forms. For example a Newspaper might have a search for an article by: Code: <FORM>(form name = "formONE") Paper Type Weekly [] Daily [x] Monthly [] {SUBMIT BUTTON} </ FORM> <FORM> (form name = "formTWO") Location Upper East [] Null County [] Down South [x] {SUBMIT BUTTON} </ FORM> <FORM> (form name = "formTHREE") Article Section Lifestyle [] Sports [x] Weather [] Finances [] {SUBMIT BUTTON} </ FORM> SO looking at the above...If the user "checked" (I placed 'x' in there) those boxes...and clicked ANY of the submit buttons, I want to be able to pull-in EACH of the checked items from ALL THREE of the forms. What is happening now with my code, is I'm only getting the results for the form which I clicked the 'submit' button in. I know you might ask, "why not just put them in one form?"... but I have them in separate forms because I want the user to have the ability to "CHECK/UNCHECK ALL" for each category (i.e. Paper Type, Location, Article Section...) Is it as easy as just wrapping all of those forms in one GIANT form, and supply each submit button with the name of that GIANT form? I hope this makes sense, and let me know if you need anything else at all...it's the last piece of this search and I just want to get it out of the waY!! Thanks guys! I'm trying to understand the need for <div> elements, couldnt we do the same things with a <p> element. I understand the <span> element because it allows you to have box models for inline elements. Is <div> mostly to keep things organized and easy to read? This is my first project using CSS and anything other than basic HTML and it's been going good so far. The page I'm designing is for my new guild on World of Warcraft (yes I'm addicted) and my problem is with the Content DIV i created. The site is http://twilightsdawn.50webs.com/index.html In the code, I nested DIV elements containing the actual news posts themselves within the actual Content DIV, and by not specifying a height I had hoped the element would resize and simply tack on extra DIVS below one another. This seems to be the case with Banner and Content Text DIVs but the second set simply overwrite the previous and all my attempts to force the second "news post" below the first have failed or resulted in bizarre alignments. I am at a loss and would appreciate any design suggestions and/or feedback on the code. Thanks Hello everyone, I have a problem and it is driving me insane :/. I am trying to create 3 inline boxes (using span or div?) that are right next to one another (ie. with no borders). The two at either side are of length 25% and the middle is of length 50%. Here is my effort at coding it myself : 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>Untitled Document</title> <style> body { word-spacing: 0px; } .sideWrap { top: 0px; width: 25%; height: 100px; background-color: #0CF; display: inline-block; } .sideWrap2 { top: 0px; width: 25%; height: 100px; background-color: #0CF; display: inline-block; } .center { padding: 0px; margin: 0px; left: 25%; width: 50%; height: 200px; background-color: #0F0; display: inline-block; } </style> </head> <body> <span class="sideWrap"></span> <span class="center"></span> <span class="sideWrap"></span> </body> </html> But unfortunately, this produces ... something I dont want .. as shown by the attachment. This clearly has inexplicable white borders that I have not coded :S, and the three blocks are not inline. Can anyone give a simple explanation as to how to put these in line and eliminate the border between them? Thanks in advance, mintsmike Please help me, I'm trying to hide elements (boxes) is HTML in this way: <?php if($_POST) { //left.style.visibility="hidden" document.getElementById(left).style.display = 'none'; } ?> By checking if a form had been submitted...But when displaying the page all elements on the page is hidden not the element "left" only..Why? Thanks is advance. Hi, I have a form with html combo and input elements in a dialog with scrollbar. Problem I am facing is some of combo elements which are disabled disappear. When I scroll the disabled elements appear again. This happens only on IE. Works fine on firefox. Is there any issue with disabled elements as such. Thanks I am using ASP.NET however my front end design skills arent that great. what I was wondering was, since I am using a repeater or a datalist control, I want each element to have a nice design. the site is like a products site (retail type website). I mean, the styling for each element is something I im unsure how to design, any suggestions or tips on how each element should be designed/layed out? product detail: qty, product name, image, smalldescription. styling/designing/theme doesnt matter, you can include that. just a rough guide would be nice in terms of how the layout for a product should be design, like where each piece of information should be layed out. thanks. thanks. Is there a way that anyone knows of to put list items side by side in a row? I'm currently working with some html/css/jquery that allows you to move li elements around and order them. However, instead of being on a new line for each element, I'd like to put several side by side in a row. Is there any way with html/css to make this happen, or is there no way to change the "nature" of li elements? I created a form with html. At the end of the form there are two buttons, the button "entry", and the button "reset". When clicking on "entry" button i want to print the form's elements. How can i do it? Trying to modify a template.. http://www.varaxon.com/ On the right, below the login box are 3 seperate boxes - I've been trying to make these completely clickable - I just can't seem to figure it out. I tried doing unordered lists, etc. Color me stupid - I'm just a lowly PHP Developer with minimal design/html coding experience. -G Sorry, i answered my own question. thanks for looking anyways Hello everyone, I'm new here. I hope someone will help me with my problem. You can see it he http://kahoe.monline.dk/portfolie2/index.php EDIT: Problem 1 solved. Problem 1 is in the grey menu to the right. I've used php include_once to insert four div elements (with images and a little text), but they position themselves in a strange way. It's supposed to be a collumn. You can see the html file with the four elements he http://kahoe.monline.dk/portfolie2/globalmenu.html I should probably say that I've used javascript to make a hover effect with the images. (Do I need to include code in this post, or do you guys usually view CSS and HTML in the browser?) Problem 2 is with IE. I have IE 8 installed, so I don't know about other versions, but this one can't find the images on my website. It works fine in Firefox. What's wrong? Problem 3 is with the div element at the top of the page, the one which contains the text "Denne hjemmeside ses bedst med Firefox. Download Firefox her. " I can't get it to sit at the very top of the page. I've used body { margin: 0; padding: 0; } in the stylesheet already, but it's not enough apparently... Hi, I have a form that has a bunch of cascading drop downs - something like Country->State->City->. Each subsequent drop down is populated based on what is selected on the preceding one. What I am having trouble with is the positioning of the labels for these dropdowns. For ex., I want the word 'Country' written exactly above the Country dropdown, the word 'State' above the State dropdown and so on. Unfortunately, anything I try doesn't seem to work. I have used every CSS property I thought would help - margin, position, padding etc., but nothing works. The problem is when I resize the window the labels and the dropdowns are thrown out of whack and it becomes difficult to figure out just by looking which label belongs to which dropdown box. How do I fix this and align the form with their respective labels and make it independent of the size of the window? Thanks! I am currently creating some code containing a horizontal rule, some headers and a link that takes the user back to the top of the page. The page should look something like this... ------------------------------------------------------- HEADER ------------------------------------------------------- back to top HEADER How can I make it so that the header is the same distance from the horizontal rule regardless of whether the back to top link is present? At the moment whenever the 'back to top' link is present the header below is pushed down. Here is my code so far... Code: <style type="text/css"> a{ margin-left:700px; } h2{ margin-top:20px; } </style> <hr> <h2>HEADER</h2> <p>Paragraph here</p> <hr> <a href="#top">back to top</a> <h2>HEADER</h2> <p>Paragraph here</p> |