Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. You can just select items where buyer != tagged.
  2. You only need one connection, only close the connection after all of your database work is done. You can close a prepared statement once you're done using it.
  3. Firefox and Chrome also have tools to emulate smaller devices. What's your issue with Safari's tool?
  4. It looks like you haven't tried to get it to stick to the bottom. What you're looking for is called a sticky footer. It's a very common technique. Early implementations required you to set a fixed height to your website's footer, but there might be more modern approaches.
  5. What is the CSS code for your footer?
  6. That's just how the browser renders the alert box. You have no control over it.
  7. What is your code like? Normally, grids depend on the nth-child() selector to work, I'm not sure if this is the case for W3.CSS. If you have elements that aren't part of the grid in the same level as the grid cells it will interfere with the grid.
  8. You should only need one connection for each database host. If you are continually opening and closing connections then your code is going to run very slow. You should open one connection, perform all the queries, then close the connection when the script is finished.
  9. The problem is that in MySQLi, fetch_assoc() doesn't work with prepared statements. To get results in MySQLi you have to use bind_result() and then fetch(). I've found that store_result() is necessary too. This is why I prefer PDO to MySQLi.
  10. This is from the page you just linked to The query here is a SELECT statement.
  11. In object-oriented programming objects are composed of properties and of methods. Properties contain information about the object and methods are actions that the object can do. In your code the GameGuess object has a Send () method. Your do...while loop is not inside a method, but in Java, all logic has to be inside methods. If you have changed your code, please post your new code.
  12. Your code is not inside a method. In Java, all the code must be inside methods. What program are you using to write Java? It should be highlighting those syntax errors. if you don't know what a method is, you'll have to start learning the very basics of object-oriented programming.
  13. Link directly to the file, the browser will prompt them to download it, or will display it right in the window if it has PDF reading support. There is no better way, PDF documents cannot be embedded in a page.
  14. Your loop isn't inside a method, I don't believe this code will even compile.
  15. That is PDO, it won't work with your MySQLi connection. See an example for opening a PDO connection here: https://www.w3schools.com/php/php_mysql_connect.asp
  16. Yes, that's secure. I don't believe rowCount() works like that in PDO, though. Just remove the rowcount part and check that you were able to fetch a row instead: if($row = $stmt->fetch(PDO::FETCH_ASSOC) { $id = $row['id']; $name = $row['name']; $age = $row['age']; } else { echo 'No data available'; }
  17. Have you verified that the image was loaded? Open the developer tools (Pressing F12 on the keyboard) and make sure that "DAVIS LOGO_0.png" is getting a 200 status in the network tab.
  18. That's a bootstrap example. It doesn't help with CSS.
  19. The correct HTML for a text area is <textarea> Block elements are displayed with a new line before and after them, keeping them on their own line. The correct document type declaration for HTML 5 is <!DOCTYPE html>. In the generalized document type definition the keyword that follows "DOCTYPE" is the name of the root node of the document. Since HTML 5 <svg> elements can be placed right in the HTML document. Audio files are embedded into the page using the <audio> element. There's the <meter> element to display a scalar measurement within a range, but Internet Explorer 11 and under don't support it. The <header> element is used to indicate the header of the page, section or article. The <head> element just contains metadata about the page.
  20. Can you not remove it from the HTML? That would be the ideal solution. In CSS, you can give a class name to the object or you can use the :nth-child selector. .responsive-menus-simple li:nth-child(2) { display: none; }
  21. I don't see the issue you're talking about, but perhaps you're referring to the fact that two different tables have differing column widths. The width of a table and its cells is calculated by the width of the content within it. You can set the width of the left cells to a specified value and that will work as long as the content fits inside the cell.
  22. That sounds like a browser quirk. The permitted values for list-style-type are here: https://www.w3schools.com/cssref/pr_list-style-type.asp Usually when a browser encounters an unknown CSS value it ignores the rule, but in this case it seems to be using numbers instead. I would not rely on this behavior because it's not standard so it's not guaranteed to work like that on all browsers.
  23. There's a "Report Error" at the bottom of the page, but if you test the code in this editor you'll see that it works: https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_canvas_createpattern That's because the fillStyle property is used by the fill() method, not the rect() method. The fill() method fills shapes that were created earlier in the code.
  24. First, find your limits: var leftLimit = init_pos[0] - 100; var rightLimit = init_pos[0] + 100; Then store the currently calculated position: var newX = init_pos[0] + e.pageX - drag_start [0]; If the position is within the limits, use that position, otherwise use the limit. if(newX < leftLimit) { newX = leftLimit; } if(newX > rightLimit) { newX = rightLimit; } Finally, set the style of the element: drag_target.style.left = newX + "px";
  25. You didn't specify that you were talking about W3.CSS. Since this is in the CSS forum I thought you were talking about plain CSS. I don't use CSS frameworks, myself, so I haven't really looked at W3.CSS. If there's something the framework doesn't offer, you can write some of your own CSS to override it.
×
×
  • Create New...