Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. An element must have position: absolute, position: relative; or position: fixed in order for z-index to have any effect. Give the <img> element a negative z-index and it will work fine for putting it behind the header. If you'd rather give the header a positive z-index you'll have to set the position property.
  2. Ingolme

    Untidy form

    "float: left" is what's causing the gender section to have a problem. I don't think you need the float to begin with.
  3. Ingolme

    Spans that push?

    Float doesn't really do anything, maybe it makes it behave more like a block. If you set the display: to block and then float it will allow width and height to be set.
  4. It is true that to be able to style HTML 5 elements in older versions of Internet Explorer you need to create one with Javascript first. document.createElement("header");document.createElement("footer");document.createElement("article");... Some people have premade scripts with all the elements made for you that you can attach to your document.
  5. Ingolme

    Spans that push?

    Spans are allowed to have horizontal margins and padding. Height, vertical padding and vertical margins don't work, but you can use line-height.
  6. Java has nothing to do with Javascript. AJAX is just a system for Javascript to make requests to the server without reloading the page, it runs on the client. The server cannot tell if a request was sent by AJAX or by the browser.
  7. I believe 404 is a much better response than a 301 leading to the home page. A 301 leading to the page's new location is good, of course. If the page no longer exists then search engines need to know it.
  8. Ingolme

    Untidy form

    Well, why are they like this? And what would you like them to look like? I can think of many different ways to make a page look like that image, I can't guess what your code is like.
  9. You seem to be missing a textarea with the ID "deltagare-emaillist". I can't see it on the page, and the error console says it can't find the element either.Javascript normally stops executing when it encounters an error.
  10. If you can show the HTML you're using I can test it on my computer and see what's not working. I'll take a closer look at your current code until then. Update:Here's my test code and it's working: <!DOCTYPE html><html> <head> <script> function deltagare(){ var myTextField1 = document.getElementById('namn'); var myTextField2 = document.getElementById('epost'); if(myTextField1.value != "" && myTextField2.value != "") { document.getElementById("deltagare-list").value+=myTextField1.value+" "+"("+myTextField2.value+")"+"\n"; document.getElementById("deltagare-emaillist").value+=myTextField2.value+","; document.getElementById('namn').value=""; document.getElementById('epost').value=""; } else { alert("Skriv in både namn och epost!"); } } </script> <title>Test</title> </head> <body> <div> <input type="text" id="namn"> <input type="text" id="epost"> <textarea id="deltagare-list"></textarea> <textarea id="deltagare-emaillist"></textarea> <input type="button" value="Test" onclick="deltagare();"> </div> </body></html>
  11. Edit:I see what you're trying to do, I'll have to look into it. ----It is difficult to understand your problem. Try to explain it in short sentences. A percentage width is based on the width of the closest ancestor element that has a width, if there is none then it is based on the width of the windows. Setting width to 500% is most likely making the element 5 times wider than the window. On a separate note: An element that doesn't have height set with CSS will change its height to hold all the text that is inside it. If you make the width smaller, the text will take more vertical space to the height will be bigger.
  12. I have no problem with your inexperience, everybody goes through a phase of learning and I'm glad to help. I just would like to talk with the people who taught you or provided you with the information you learnt from, teaching badly is a disservice to people. The problem you're experiencing after fixing the first mistake probably has to do with ending your lines with a comma (,) instead of a semi-colon( ; )
  13. You're supposed to use curly braces to make a code block. W3Schools even teaches it that way. I'm not sure where you learnt Javascript. if(condition) { Multiple lines of code} else { More code}
  14. I'm not sure of the exact syntax for HTTP headers, but try adding a semi-colon between the parameters: $headers .= 'Content-type: multipart/alternative; charset="utf-8"; boundary="PHP-alt-'.$random_hash.'"' . "\r\n";
  15. NaN is not equal to NaN. That's just how it works.Use isNaN() to check if a value is NaN. http://www.w3schools.com/jsref/jsref_isnan.asp
  16. $query = mysqli_query($con,"UPDATE Persons SET Age=$x WHERE FirstName='Peter' AND LastName='Griffin'");if(!$query) { echo mysqli_error();} I think, if Age is a text field, that you should be putting the value of $x between quotation marks:SET Age='$x'
  17. Did you check to see if mysqli_error() shows anything?Is "Age" an integer field?
  18. The HTML of your form has a mistake in it. You should look for it.
  19. The type should be "text/xsl"With the information you've provided, I can't see how it wouldn't work. You'll have to post all the code, or show an example online.
  20. It can be done without jQuery. Have a class called "active" and on the particular page put the class on the submenu that you want to show. <li class="active"> ul#menu li.active ul { display: block;}
  21. Set the margin of the H1 element to 0
  22. There's no way to stop Javascript using Javascript. To leave a function you can use return. If you put the entire program inside a function you can use the return keyword to stop the program when you want to.
  23. There's the reload() method of the location object http://www.w3schools.com/jsref/met_loc_reload.asp
  24. Click on the text that has the text shadow and look at the CSS assigned to the element. Also look at some of the parent element to see if you find a rule that's causing the element to behave like that.
×
×
  • Create New...