How to scale SVG image to fill browser window?

How about: html, body { margin:0; padding:0; overflow:hidden } svg { position:fixed; top:0; bottom:0; left:0; right:0 } Or: html, body { margin:0; padding:0; overflow:hidden } svg { position:fixed; top:0; left:0; height:100%; width:100% } I have an example on my site using (roughly) this technique, albeit with 5% padding all around, and using position:absolute instead of … Read more

What are best practices to order elements in ?

In HTML, the DOCTYPE must come first, followed by a single <html> element, which must contain a <head> element containing a <title> element, followed by a <body> element. See the description of the global structure of an HTML document in HTML 4.01 and the HTML5 draft; the actual requirements are mostly the same other than … Read more

Can an XSLT insert the current date?

XSLT 2 Date functions are available natively, such as: <xsl:value-of select=”current-dateTime()”/> There is also current-date() and current-time(). XSLT 1 Use the EXSLT date and times extension package. Download the date and times package from GitHub. Extract date.xsl to the location of your XSL files. Set the stylesheet header. Import date.xsl. For example: <xsl:stylesheet version=”1.0″ xmlns:date=”http://exslt.org/dates-and-times” … Read more

Table with table-layout: fixed; and how to make one column wider

You could just give the first cell (therefore column) a width and have the rest default to auto table { table-layout: fixed; border-collapse: collapse; width: 100%; } td { border: 1px solid #000; width: 150px; } td+td { width: auto; } <table> <tr> <td>150px</td> <td>equal</td> <td>equal</td> </tr> </table> or alternatively the “proper way” to get … Read more

The reference to entity “foo” must end with the ‘;’ delimiter

The ampersand & is a special character in HTML and XML. If you want to use it as a normal character, you have to encode it correctly. Write &amp; instead of &: src=”https://stackoverflow.com/questions/6483807/…9623&amp;w=180&amp;h=46&amp;style=white&amp;variant=text&amp;loc=en_US” & denotes the start of an encoded entity, such as &lt; for <, or &amp; for &. In your case the parser … Read more

Focus Input Box On Load

There are two parts to your question. 1) How to focus an input on page load? You can just add the autofocus attribute to the input. <input id=”myinputbox” type=”text” autofocus> However, this might not be supported in all browsers, so we can use javascript. window.onload = function() { var input = document.getElementById(“myinputbox”).focus(); } 2) How … Read more

The entity name must immediately follow the ‘&’ in the entity reference

All answers posted so far are giving the right solutions, however no one answer was able to properly explain the underlying cause of the concrete problem. Facelets is a XML based view technology which uses XHTML+XML to generate HTML output. XML has five special characters which has special treatment by the XML parser: < the … Read more