Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. No, because each browser stores their own cookies, and cookies can be deleted. A user would be allowed to give as many votes, at minimum, as the amount of browsers installed on their computer. If they figure out to delete the cookies they'll get unlimited votes.
  2. Yes, the problem is that you need to load FontAwesome on your website. The accordion menu script you got uses it.
  3. I don't know what a "shirker" is. I see that your have some unicode characters that appear to be from fontawesome. The accordion code you're using requires you to include this on your page: http://fontawesome.io/get-started/
  4. It's in the reference: http://www.w3schools.com/cssref/css3_pr_animation-fill-mode.asp For animations that do not repeat indefinitely, animation-fill-mode determines what the element will look like when it's not animating. "none" means that no style from the animation will be applied to the element. "forwards" means that after the animation has ended the element will look like it did in the last animation frame.
  5. You are either going to have to learn Javascript or learn a server-side scripting language. HTML alone can't do it.
  6. THere are plenty of functions missing from the W3Schools website, it's simply too much to keep track of. If you want complete information, always go to the official source. Here's the list of Date functions in MySQL: http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html
  7. When you use DISTINCT on multiple columns, the only thing that is distinct is the combination of the column's values. If the values of each column can be "A" and "B", the query for two columns could only return a maximum of four results: AA, AB, BA and BB
  8. You edit records using the UPDATE statement: http://www.w3schools.com/sql/sql_update.asp To put data into a form, pull the data out of the database using an ordinary SELECT query, then print the values into the value attribute of the input element. <input type="text" name="fname" value="<?php echo $data['first_name']; ?>">
  9. Yes, you would need a class, on the <p> element or one of its ancestors.
  10. The text would be wrapped in a <p> element inside one of the boxes. You can set the width of the <p> element and set its left and right margins to "auto" to center it inside the column.
  11. That's not a good way to use the <br> element, because the line break does not have any meaning in that text. The only good uses for <br> elements I can think of are poetry and for separating lines in a postal address. If you want the text to wrap at a particular point, just change the width of the element that is containing the text.
  12. The difference between W3.CSS and Bootstrap is that Bootstrap comes with a bootstrap.js file while W3.CSS has no associated JS file in the framework. You just include w3.css in your website and everything else has to be added manually on top.
  13. I think the point they're trying to get with these examples is that if you want something done with Javascript you have to write the Javascript yourself, the framework is a purely CSS framework intended just for presentation and not behavior.
  14. Float all the boxes to the left. On the third box, clear left. If you want proper alignment, you can set the widths of the first two boxes to 50% and the widths of the following 3 boxes to 33.33%. If you want spacing between those boxes you'll have to do some calculations so that the sum of widths and margins add up to 100%.
  15. Clear: right only clears elements that were floated right. Clear: left will clear elements that were floated to the left.
  16. The VALUES() keyword is only used in INSERT queries. You don't need it for SELECT queries, just do this: $stmt = $conn->prepare("SELECT name, bedrooms, length, width, mainpic, serialno FROM holidayhomes"); $stmt->execute(); This looks like MySQLi, so you might need to use bind_result() to get the data. I prefer PDO, which lets you retrieve results from a prepared statement in an associative array.
  17. That's not part of the W3.CSS framework, they just add Javascript onto the page in the examples specifically because it's not included in the framework.
  18. They should not be set to display: inline, leave them as they are. They should be blocks. Inline elements always allow content to be next to them.
  19. I don't think the W3Schools staff visits the forum. But this is the problem with calling something "deep-purple" as a class name. It means that when you want to change the color you have to change the HTML. To work around this, you can change the class name of the element instead: document.getElementsByClassName("w3-deep-purple")[0].className = "w3-orange";
  20. Don't use positioning for layout. When you use absolute positioning, the element is no longer taken into account when calculating the height of the document. div1 has no height at all if the only thing inside it is div2. <div1> and <div2> are not valid HTML elements, I hope that in your real document they're just called <div>.
  21. Unlike Bootstrap, W3.CSS does not use any Javascript. If you look at the example page, what they've done is add Javascript to it. If you look at the bottom of the page, they've defined a function called openNav(). What you can do is go through each of the links and have them call openNav when clicked. // Get a list of links var links = document.querySelectorAll(".w3-navbar .w3-hide-small > a"); // Loop through the links to add the event listener for(var i = 0; i < links.length; i++) { links[i].addEventListener("click", openNav, false); }
  22. You don't need prepared statements unless there's user input. You wouldn't need it for SELECT * FROM table, but you would need it for SELECT * FROM table WHERE field = $something
  23. You can add a click event to all the links within the menu to make the menu collapse.
  24. The file you attached does work. The hwbToRgb() function only exists if you load the w3color.js file, it's not native to the browser. I don't think any browsers natively support hwb() as a color format.
×
×
  • Create New...