CSS Grid Row Height Safari Bug

Short Answer The problem is that Safari is not recognizing the height: 100% on the img elements. Explanation This is not a Safari bug. It’s just a different interpretation of the spec. When dealing with percentage heights, some browsers (like Safari) adhere to the traditional interpretation of the spec, which requires a defined height on … Read more

How can I pre-populate html form input fields from url parameters?

Use a custom query string Javascript function. function querySt(ji) { hu = window.location.search.substring(1); gy = hu.split(“&”); for (i=0;i<gy.length;i++) { ft = gy[i].split(“=”); if (ft[0] == ji) { return ft[1]; } } } var koko = querySt(“koko”); Then assign the retrieved value to the input control; something like: document.getElementById(‘mytxt’).value = koko;

Question mark characters display within text. Why is this?

The following articles will be useful: 10.3 Specifying Character Sets and Collations 10.4 Connection Character Sets and Collations After you connect to the database, issue the following command: SET NAMES ‘utf8’; Ensure that your web page also uses the UTF-8 encoding: <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ /> PHP also offers several functions that will be useful … Read more

Is it possible to reuse HTML like a template on multiple pages?

You could do it in this fashion below. <head> <link rel=”import” href=”https://stackoverflow.com/questions/36387676/myheadertemplate.html”> </head> where you could have your myheadertemplate.html <div> <h1>This is my header</h1> <div id = “navbar”> <div class = “Tab”>Home</div> <div class = “Tab”>Contact</div> </div> </div> You can then use it with JS below var content = document.querySelector(‘link[rel=”import”]’).import;

What does “semantically correct” mean?

Labeling correctly It means that you’re calling something what it actually is. The classic example is that if something is a table, it should contain rows and columns of data. To use that for layout is semantically incorrect – you’re saying “this is a table” when it’s not. Another example: a list (<ul> or <ol>) … Read more

What is the purpose for HTML’s tbody?

To give semantic meaning to your table: <table> <thead> <tr> <th>Person</th> <th>Amount</th> <th>Date</th> </tr> </thead> <tbody> <tr> <td>Person1</td> <td>$5.99</td> <td>02/03/09</td> </tr> <tr> <td>Person2</td> <td>$12.99</td> <td>08/15/09</td> </tr> </tbody> </table> According to the specification: Table rows may be grouped into a table head, table foot, and one or more table body sections, using the THEAD, TFOOT and … Read more

HTML5 getUserMedia record webcam, both audio and video

MediaStreamRecorder is a WebRTC API for recording getUserMedia() streams( still under implementation) . It allows web apps to create a file from a live audio/video session. <script language=”javascript” type=”text/javascript”> function onVideoFail(e) { console.log(‘webcam fail!’, e); }; function hasGetUserMedia() { // Note: Opera is unprefixed. return !!(navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia); } if (hasGetUserMedia()) … Read more