Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. You haven't set the list-style-type property. This works: .cities-we-serve-menu-block .parent-item1 { margin-left: 15px; display: list-item; list-style-type: square; } You might have to adjust the margin and padding for the list item.
  2. Are there any other styles being applied to the element? Use the DOM inspector to see what styles the element has.
  3. Yes. Your specifications weren't clear. Your post made it sound like you have two rows and you want to switch between them. You can have one nav bar and make its content change when buttons are clicked, but it's going to need some complicated Javascript to work properly. Is it horizontal sliding or vertical sliding that you want?
  4. It can be done, but not with basic W3.CSS or Bootstrap, you'll have to do some Javascript programming. When "menu" is clicked, hide the top bar and show the bottom bar. When "login" is clicked, hide the bottom bar and show the top bar.
  5. According to MDN, the input event is only supported on IE9 and above. https://developer.mozilla.org/en-US/docs/Web/Events/input I would know if it existed in IE6 because I was already developing websites while IE6 was prevalent and the oninput event hadn't even been created yet. Personally, I don't support browsers older than IE9. Even that's looking too far back in some peoples' opinions. There's no return on investment in trying to make workarounds for browsers nobody uses.
  6. Which versions of Internet Explorer do you intend to support? An overwhelmingly large amount of Internet Explorer users have IE9 or above which supports the placeholder attribute. I don't have statistics on me right now but I would estimate that at least 98 or 99 percent of Internet users have a browser that supports it. On the subject of browser compatibility, the oninput event is not supported by very old versions of Internet Explorer.
  7. You should be using the HTML 5 placeholder attribute: <input placeholder="First name"> But if you really want to use jQuery for it, you can use the oninput event and check that the value of the input is empty input.on("input", function(e) { if(input.val().length > 0) { label.stop().show(); // Not sure what stop() is for, but I'll leave it here for now. } else { label.stop().hide(); } });
  8. Ingolme

    Bootstrap v W3.CSS

    Personally, I'm opposed to frameworks that mix presentation into the content. What's the difference between <div class="w3-text-red">Text</div> and <div style="color:#f44336">Text</div>? They're both equally hard to maintain, any changes in design require change in the mark-up for every page on the site. CSS was created in 1999 specifically to prevent this kind of problem. Both W3.CSS and Bootstrap are guilty of this. From my perspective, these frameworks are only good for businesses that don't have the time and money to invest in a proper CSS developer and need responsive sites done quickly.
  9. I can't find the relation between the code you've shown and the question you're asking. There isn't a form tag or form processing code. A session variable shouldn't be necessary if you have one form for each item. Just add the ID as a hidden input. <input type="hidden" name="zoekertjesid" value="<?php echo $zoekertjesid; ?>"> You should leave the form action attribute empty rather than using PHP_SELF, then it will preserve query string values and you can use $_GET to find out which ID is being used.
  10. Inspecting the element wouldn't show the answer to the question if the answers were being processed on the server side. Can you show a sample of the code used for one question?
  11. I would hope you're processing the answers to the test on the server-side. If you're putting the answers in Javascript even a 12-year-old could find it.
  12. Oh, no. Your page is very out of date. Drop the HTML 4.01 Transitional DOCTYPE. Here's an HTML 5 template: <!DOCTYPE html> <html> <head> <title>Website title</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheeet" href="style.css"> </head> <body> Page content goes here </body> </html> You should have a CSS file to style the page. Read about CSS here: http://www.w3schools.com/css/default.asp Tags like <center> and <font> don't exist, attributes such as bgcolor and align don't exist. CSS takes care of all of that. For a solution to your immediate query, you can use the background-size property. Setting it to "cover" or "contain" will work. Read about the background-size property here: http://www.w3schools.com/cssref/css3_pr_background-size.asp
  13. That's just one of the elements necessary for responsive design. It alone won't solve everything.
  14. Detecting device screen size is a bad idea. Look up responsive design, the technique of making pages flexible. In general, use percentage widths instead of pixels and use media queries to rearrange elements on screens that are too small to have elements side by side.
  15. Changing the form's action would not be a threat to your server. Even if a hacker managed to change PHP_SELF it would only apply to his own computer. The only possible threat with this setup is if he could change the value of PHP_SELF for all the visitors on your site, then he could get information from your visitors submitted to his own site, which would be referred to as "phishing". Either way, even though there are no security threats with this approach, there's no need to use PHP_SELF. An empty or nonexistent action attribute will submit to the same page on its own.
  16. Ingolme

    Output tag

    I don't think I understand what you're trying to say.
  17. Ingolme

    Output tag

    No, that's not what the <output> tag is for. The <output> tag is for displaying the result of a calculation. Here's the reference page: http://www.w3schools.com/tags/tag_output.asp
  18. The recommended way is described here for each of the MySQL libraries: http://php.net/manual/en/mysqlinfo.concepts.charset.php For MySQLi: $mysqli->set_charset() For PDO, use the constructor: new PDO("mysql:host=localhost;dbname=world;charset=utf8", 'my_user', 'my_pass')
  19. Go to the block administration and move those blocks to the other page region.
  20. Remove the background color from the overlay rule. If you still want that color behind the image then put the color on the container.
  21. _blank, _parent, _self and _top are options that you should choose based on what you want your page to do. Do you understand what each of them means? If not, then you should look through the reference, there's no point in using something if you don't know what it does. Here's the page that describes each of the options: http://www.w3schools.com/jsref/met_win_open.asp I actually have not experimented with pages that close themselves, so I can't tell for sure if page 2 will be allowed to close itself after being opened by a script from page 1, but if you want to be safe, the script to close page 2 should be in page 1. You can have a function declared on page 1 that is called from page 2. Page 2 should have access to methods declared on page 1 by using the window.opener property.
  22. Set the margin and padding of the <figure> element to zero. Putting a negative margin on the image would just be compensating for existing padding or margin that shouldn't be there.
  23. A script can only close windows that it created using window.open(). This was a security feature to prevent websites from closing windows without the user's permission.
  24. That's how it's designed. "Untidy" is a matter of opinion.
  25. You can't store that into a session because the object only works while the connection to the MySQL server is open. Once the connection is closed the object stops working. If you want to store all the results, store it in an array: $results = $mysqli->query($query); $data = array(); while($row = $mysqli->fetchAssoc()) { $data[] = $row; } $_SESSION['iml'] = $data;
×
×
  • Create New...