background preloader

Html5shiv - HTML5 IE enabling script

Html5shiv - HTML5 IE enabling script
Dual licensed under the MIT or GPL Version 2 licenses Full original, uncompressed source available here: Source code adds new HTML5 elements (which is simple code), but also supports printing HTML5 elements and includes the default styles for HTML5 elements, like block on article and section. Getting it to work in the browser was easy, @jon_neal and afarkas made IE actually print HTML5 elements - these guys are to take all the credit. To use this script, download the html5shiv and roll it in to your own code (ideally minified). Common question: what's the difference between the html5shim and the html5shiv?

Designing CSS Layouts With Flexbox Is As Easy As Pie Advertisement This article is an updated excerpt of the chapter “Restyle, Recode, Reimagine With CSS3″ from our Smashing Book #3, written by Lea Verou and David Storey. — Ed. Flexible box layout (or flexbox) is a new box model optimized for UI layout. As one of the first CSS modules designed for actual layout (floats were really meant mostly for things such as wrapping text around images), it makes a lot of tasks much easier, or even possible at all. Flexbox’s repertoire includes the simple centering of elements (both horizontally and vertically), the expansion and contraction of elements to fill available space, and source-code independent layout, among others abilities. Flexbox has lived a storied existence. There are, however, some caveats. When you specify that an element will use the flexbox model, its children are laid out along either the horizontal or vertical axis, depending on the direction specified. Example: Horizontal And Vertical Centering (Or The Holy Grail Of Web Design) <!

HTML5 enabling script 7 Jan Since HTML5 is getting more attention by way of marking up our new pages, and the only way to get IE to acknowledge the new elements, such as <article>, is to use the HTML5 shiv, I’ve quickly put together a mini script that enables all the new elements. Download html5shiv.js and must be inserted in the head element (this is because IE needs to know about the element before it comes to render them – so it can’t sit in the footer of the page, i.e. below the elements in question). I’ve updated this post to link to Alexander Farkas’s version of the shiv – it’s the very latest and my simple one line script. The one I originally released was (I thought) beautifully small, but didn’t support print styles nor dynamic injection of HTML5 elements. Good thing there are smarter folk than I!

scottjehl/Respond scottjehl/picturefill HTML5 This specification defines the 5th major version, second minor revision of the core language of the World Wide Web: the Hypertext Markup Language (HTML). In this version, new features continue to be introduced to help Web application authors, new elements continue to be introduced based on research into prevailing authoring practices, and special attention continues to be given to defining clear conformance criteria for user agents in an effort to improve interoperability. This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at This document was published by the Web Platform Working Group as a W3C Recommendation for HTML 5.2 that would obsolete the HTML 5.1 Recommendation. This document was produced by a group operating under the W3C Patent Policy.

Selectivizr - CSS3 pseudo-class and attribute selectors for IE 6-8 Aspects & Reference (speaker website) HTML5 Reference It is useful to make a distinction between the vocabulary of an HTML document—the elements and attributes, and their meanings—and the syntax in which it is written. HTML has a defined set of elements and attributes which can be used in a document; each designed for a specific purpose with their own meaning. Consider this set of elements to be analogous to the list of words in a dictionary. This includes elements for headings, paragraphs, lists, tables, links, form controls and many other features. The basic structure of elements in an HTML document is a tree structure. 3.1 Syntactic Overview There are two syntaxes that can be used: the traditional HTML syntax, and the XHTML syntax. The HTML syntax is loosely based upon the older, though very widely used syntax from HTML 4.01. <! XHTML, however, is based on the much more strict XML syntax. 3.2 The Syntax There are a number of basic components make up the syntax of HTML, that are used throughout any document. 3.2.1 DOCTYPE Declaration end tag

aFarkas/html5shiv: This script is the defacto way to enable use of HTML5 sectioning elements in legacy Internet Explorer. Sass vs. LESS vs. Stylus: Preprocessor Shootout Wielding the true power of a CSS preprocessor is an adventure. There are countless languages, syntaxes, and features, all ready for use right now. In this article, we will be covering the various features and benefits of using three different preprocessors—Sass, LESS, and Stylus. Preprocessors produce CSS that works in all browsers. CSS3 preprocessors are languages written for the sole purpose of adding cool, inventive features to CSS without breaking browser compatibility. The most important part of writing code in a CSS preprocessor is understanding the syntax. Sass and LESS both use the standard CSS syntax. As you may have noticed, this is just regular CSS, which compiles perfectly in both Sass and LESS. It's important to note that Sass also has an older syntax, which omits semicolons and curly brackets. The syntax for Stylus is much more verbose. Using different variations in the same stylesheet is also valid, so the following will compile without errors.

HTML5 Tutorial - Welcome CSS3 PIE: CSS3 decorations for IE Box Sizing The "box model" in CSS works like this: width + padding + border = actual visible/rendered width of box height + padding + border = actual visible/rendered height of box It's a little weird, but you get used to it. In IE 6 and earlier, when in "quirks mode," the box model was treated differently. width = actual visible/rendered width of box height = actual visible/rendered height of box The border and padding values moved inward, cutting into the width/height of the box rather than expanding it. It was weird quirk to have to deal with, although the fix was usually as easy as setting a proper DOCTYPE and getting out of quirks mode. The mind bending continues with the modern implementation. If you wanted to ensure the box kissed the edges of the parent, but still use a 100% width declaration, you'd have to set the child divs width to 476px. This <div> pseudo markup only takes us so far, because the answer of course is to not use a 100% width declaration. I would love a different box model!

Related: