Jump to content

Ingolme

Moderator
  • Content Count

    14,120
  • Joined

  • Last visited

  • Days Won

    76

Everything posted by Ingolme

  1. contains() is a function which returns true if the element has the class and false if it does not. It is not a direct replacement for toggle(). You have to write code which will check if the class already exists, if it does then use remove(), if it does not then use add().
  2. No, background-image works fine and serves a slightly different purpose than background. What I am noticing in the code that you are pasting here is that there are a lot of invisible characters which are probably interfering with your CSS code. Which text editor are you using to write your code?
  3. I believe that the toggle() method of classList is not supported by Internet Explorer. You can work around that by testing classList.contains() and then using classList.add() or classList.remove() based on whether it already has the class or not.
  4. Open the developer tools in your browser to see what it going on. In most browsers you can open them by pressing F12. Note that the body is only as tall as the content within it, so you will only see the image behind the first line of text.
  5. The images folder is not a child of the CSS folder, this is why you have to climb out of the CSS folder to find it, by prepending "../" to the path. Assuming that you described your filesystem accurately, the path you are looking for can only be "../images/Art 1.jpg". There should not have to be any guesswork here, use the correct path and if that is not working then the issue is not with the path, it is elsewhere. Watch out that your text editor is not creating curly quotes instead of ordinary quotes. The quotes in your previous post would not work because they are curly quotes. This is what curly quotes look like ( ‘ ’ “ ”). The quotes you should be using look like this:( ' ' " "). For URLs, CSS accepts single-quotes, double-quotes or no quotes at all.
  6. The correct path would be: body { background-image: url ("../images/Art 1.jpg"); }
  7. URLs in external stylesheets are relative to the location of the stylesheet itself rather than the page. I can't tell if this is your problem or not since I don't know if your CSS is in an external stylesheet.
  8. Images are inline by default. All inline elements are placed at the text baseline. There is always a bit of space reserved below the baseline, which is for hanging letters like "g" or "y", and you see this space below the image. In order to fix this, you can either make the image a block, or set its vertical align to "middle".
  9. The variable "txtWeight" is not initialized anywhere and there is no such thing as a "result" property on ordinary HTML DOM elements.
  10. The buttons are inline elements inside each "row" block, so you can center them by setting the text-align of the row to center. .row { text-align: center; }
  11. Ingolme

    SQL Tryit Editor

    What code did you use?
  12. I don't know of any most popular editor, each person just goes with what works best for them. I mostly use Notepad++ and Atom at my job. I hear Sublime is popular, but it costs money. I don't know much about SciTE, but from what I saw of it, it looks pretty primitive. It might be useful for editing local files on a Linux machine, but I'm not sure it has enough features to do serious software development.
  13. This editor is not familiar to me, but here is an article indicating how to make SciTE save files with UTF-8 encoding: https://cstan.io/?p=8557&lang=en
  14. The problem is that your text editor is generating an ANSI or ISO-8859-1 file, but the PHP engine things it's UTF-8 so it is being misinterpreted. You code editor, Notepad, Visual Studio, Sublime, Atom.io, DreamWeaver, whatever it is, needs to save the file with a UTF-8 encoding.
  15. It's not a PHP setting, you need your text editor to set the encoding of your PHP file to UTF-8. Which code editor are you using to write code?
  16. It is likely that your PHP file is not encoded as UTF-8. Your code editor should have the ability to set the encoding to UTF-8.
  17. It looks like a mistake. You can let the staff know by clicking the "REPORT ERROR" button at the bottom of that page.
  18. It works fine for me. The browser is parsing these entities before showing them to you on the screen, so you won't see something like "&lt;". If you want to see the entity codes without the browser parsing them then output your content with a plain text header. <?php if(isset($_POST['char'])) { header('Content-Type: text/plain'); $char = $_POST['char']; $char2 = htmlspecialchars($char); $char3 = htmlentities($char); echo "Teclado: {$char}\r\n"; echo "Repuesta 1: {$char2}\r\n"; echo "Repuesta 2: {$char3}\r\n"; exit; } ?> <form method="POST"> <input type="text" name="char" size="6"> <input type="submit" name="submit" value="Search!" /> </form>
  19. You should go through the SQL tutorial, there are tons of example of SELECT queries. This is very basic SQL, if you cannot spot the syntax errors then you're missing the most basic knowledge of SQL. We've gone through this before in other threads, you can't just take code from somewhere else and make random edits in the hopes that it will work. You need to understand the language you're working with. I am not even going to get into the SQL injection vulnerabilities in your code, but that is something you should do some reading on as well if you don't want your website to be hacked.
  20. By "not working" what do you mean? Does the frame exist? If so, what is inside the frame?
  21. The grammar is correct, slid is the past tense of the verb slide.
  22. Basically by counting pixels. A good image editing program will be able to tell you the coordinates on a bitmap. The issue with image maps is that they don't scale if you resize the image in HTML or CSS.
  23. There should be another <script> tag which loads the carousel plugin. Can you verify that it exists?
  24. This is not valid Javascript syntax, you can't have a literal value on the left side of an assignment operator. Maybe that's a thing in Node.js, but I don't have any experience with that.
×
×
  • Create New...