background preloader

The CSS Box Model

The CSS Box Model
At the risk of over-repeating myself: every element in web design is a rectangular box. This was my ah-ha moment that helped me really start to understand CSS-based web design and accomplish the layouts I wanted to accomplish. We've talked about the positioning of these boxes a bit, and about their behavior. What we haven't talked about much is the box itself. How is the size of the box calculated exactly? If you are a Firebug user, you might be used to the diagram like this, which does a nice job of showing you the numbers affecting any box on the page: Notice in both examples the margin is in the white. The size of the box itself is calculated like this: What if these values are undeclared? If padding or borders are undeclared, they are either zero (likely if you are using a css reset) or the browser default value (probably not zero especially on form elements that are commonly not reset). The Default Width of Block Level Boxes Absolute Boxes with No Width Floated Boxes With No Width

iOS7 UI Effects in Photoshop and After Effects With the announcement of iOS7, Apple revealed a completely new UI for their mobile OS. With the super flat design and thin fonts, Apple said that the design would be adaptable to apps by making some of the basic UI elements transparent, therefore, some of the colors of your apps content would bleed through and define how iOS7 basic components would influence the overall appearance. Another important detail of the UI was that with the transparency a blur effect was applied, similar to Windows Vista and their Aero design. So for this tutorial I will show you how to achieve the blur effect of iOS7 using Photoshop and After Effects. Step 1 The first thing I did was to download the iOS7 iPhone PSD from teehanlax ( to use the basic iOS7 UI. Step 2 Here I created a new document in Photoshop with the dimensions of the iPhone 5, 640x1136 pixels. Step 3 If you scroll up you can see that the iOS7 has a bunch of seethrough areas, sort of Windows Vista. Step 4 Step 5

<length> The <length> CSS data type denotes distance measurements. It is a <number> immediately followed by a length unit (px, em, pc, in, mm, …). Like for any CSS dimension, there is no space between the unit literal and the number. Many CSS properties take <length> values, such as width, margin, padding, font-size, border-width, text-shadow, … For some properties, using negative lengths is a syntax error, but for some properties, negative lengths are allowed. Interpolation Values of the <length> CSS data type can be interpolated in order to allow animations. Units Relative length units Font-relative lengths em This unit represents the calculated font-size of the element. ex This unit represents the x-height of the element's font. ch This unit represents the width, or more precisely the advance measure, of the glyph '0' (zero, the Unicode character U+0030) in the element's font. rem This unit represents the font-size of the root element (e.g. the font-size of the <html> element). vh vw vmin vmax px mm cm in pt

CSS Typography: Examples and Tools In the previous part of this series, we discussed some techniques and best practices for CSS typography. Let’s now delve into the subject further by looking into some case studies, tools, as well as a showcase of excellent CSS typography on the web. This is the third part of a three-part series of guides on CSS typography that will cover everything from basic syntax to best practices and tools related to CSS typography. Case Studies on CSS Typography Tutorials and theories can be great, but nothing says proof like a case study. Southern Savers Case Study: Typography Serif Fonts vs. Fixing Web Fonts, A Case Study Ten Great Free Fonts Cross-Browser: A Case Study in @Font-Face CSS Typography Tools Below is a collection of typography-related tools, with most being geared toward helping you work with CSS typography. Typographic Grid This premade CSS grid by Chris Coyier is composed to a vertical rhythm. Baseline Baseline is a typographic framework that adheres to a baseline grid. Typograph TypeTester

line-height Summary On block level elements, the line-height CSS property specifies the minimal height of line boxes within the element. On non-replaced inline elements, line-height specifies the height that is used in the calculation of the line box height. On replaced inline elements, like buttons or other input element, line-height has no effect. [1] Initial value normal Applies to all elements Inherited yes Percentages refer to the font size of the element itself Media visual Computed value for percentage and length values, the absolute length, otherwise as specified Animatable yes, as a number, a length Canonical order the unique non-ambiguous order defined by the formal grammar Syntax Formal syntax: normal | <number> | <length> | <percentage> line-height: normal line-height: 3.5 /* <number> values */ line-height: 3em /* <length> values */ line-height: 34% /* <percentage> values */ line-height: inherit Values normal Depends on the user agent. Relative to the font size of the element itself. Examples

A Showcase Of The World's Best Twitter Bootstrap Sites Dev.Opera — New Structural Elements in HTML5 Introduction HTML5 brings two new things to the table: new APIs that add essential new features to the open standards web development model, and new structural elements that define specific web page features with much more accurate semantics than were available in HTML 4. You can find articles covering many of the new APIs by looking for Dev.Opera articles marked with the HTML5 tag. This article, on the other hand, focuses on the latter — we will briefly look at how the new semantic elements were chosen, what the main new features are and how they are used, how headings work in HTML5, and browser support for these new elements, including how you can support them in older browsers. The contents are as follows: Introducing HTML5 structural elements HTML4 already has a lot of semantic elements to allow you to clearly define the different features of a web page, like forms, lists, paragraphs, tables, etc. But it could be so much better. <header>: Used to contain the header of a site. Summary

accueil 142, avenue Daumesnil 75012 PARIST. +33 (0)1 42 71 48 36F. +33 (0)1 43 55 08 02E. boitenoire@ultranoir.comW. www.ultranoir.com MARS NETWORKS 26, rue du village 13006 MARSEILLET. +33 (0)4 91 48 26 59F. +33 (0)4 91 24 67 02E. commercial@mars-networks.comW. www.mars-networks.com L'utilisateur du site internet ultranoir.com reconnaît disposer de la compétence et des moyens nécessaires pour accéder et utiliser ce site internet. Ultranoir met à disposition des utilisateurs de ce site web des informations et outils disponibles et vérifiés, mais ne saurait être tenu pour responsable des erreurs ou de l'indisponibilité de certaines informations. La structure générale, ainsi que les logiciels, textes, images animées ou fixes, sons, savoir-faire, dessins, graphismes et tous autres éléments composant ce site web sont de l'utilisation exclusive de ultranoir. L'usage de ce site web est régi par la loi française à l'exception de toute autre législation.

CSS3 module: W3C Selectors Résumé Les CSS (Cascading Style Sheets) sont un langage permettant de décrire la restitution de documents HTML et XML à l'écran, sur papier, vocalement, etc. Pour attacher des propriétés stylistiques aux éléments du document, elles utilisent les sélecteurs, qui sont des conditions de sélection de ces éléments. Statut de ce document Ce document est une version de travail de l'un des "modules" de la future spécification CSS3. Ce document est un document de travail du Groupe de Travail CSS & FP faisant partie de l'activité Style. Le Groupe de Travail pense que cette spécification est prête et souhaite donc en faire le dernier appel à commentaires. Les commentaires sur ce document de travail et les discussions le concernant peuvent être envoyés dans la liste de diffusion publique (archivée) www-style@w3.org (voyez les instructions). Ce document est toujours à l'état de document de travail et peut donc être mis à jour, remplacé ou rendu obsolète par d'autres documents du W3C à tout moment. 1.

Elliot Jay Stocks Stratégie de contenu mobile : compte-rendu de lecture Qu’est-ce qu’une stratégie de contenu à destination du web mobile ? Comment la définir et la mettre en œuvre ? Compte-rendu de l’ouvrage Stratégie de contenu mobile de Karen McGrane, par Julie Colin. Le parti-pris : la stratégie de contenu mobile, ça n’existe pas Karen McGrane est architecte de l’information et spécialiste en stratégie de contenu. La structure de l’ouvrage en 7 chapitres 1. « Doit-on vraiment migrer tout notre contenu sur les appareils mobile ? Les annonceurs Votre entreprise diffuse de la publicité à la télévision ? Les détaillants Ceux-ci doivent répondre à 3 contextes différents : Les banques ou universités Ces services proposent généralement un contenu mobile, site ou application qui s’adresse uniquement aux clients ou étudiants. Mobile ne veut pas dire allégé, ni en mouvement La frontière entre tâche de bureau et tâche mobile est mouvante. 2. 3. Bien souvent, c’est uniquement la mise en forme qui permet de fournir des informations structurelles.

Subway - Responsive Multi-Purpose WordPress Theme SUBWAY is a responsive multi-purpose WordPress theme Main Features Fully Customizable Headers – Each page can have it’s own custom header with different height and background image or slider. AJAX Animations ON/OFF – Choose between 4 fluid AJAX animated transitions between pages for a creative experience or turn AJAX off to create a classic website. Besides the predefined animations, create your own scenario by choosing animation type for any page individually. Visual Composer for WordPress ($25 value) – Visual Composer for WordPress will save you tons of time working on the site content. Bonus Parallax Pages – SUBWAY comes with an amazing bonus feature – easy to create Parallax pages perfect for presentations, microsites or a new homepage. Woo Commerce Integration – Add online shop module to your web site. Interactive Elements – Counters, pie charts, horizontal progress bars, icon progress bars, elements with animation Blog Masonry Layout – Make your blog page display in masonry layout

Related: