background preloader

CSS Text

CSS Text

Mastering CSS Coding: Getting Started Advertisement CSS has become the standard for building websites in today’s industry. Whether you are a hardcore developer or designer, you should be familiar with it. CSS is the bridge between programming and design, and any Web professional must have some general knowledge of it. Overview: What We Will Cover Today We’ll start with what you could call the fundamental properties and capabilities of CSS, ones that we commonly use to build CSS-based websites: Once you are comfortable with the basics, we will kick it up a notch with some neat tricks to build your CSS website from scratch and make some enhancements to it. 1. Most beginners get padding11 and margins12 mixed up and use them incorrectly. What Is Padding and Margin? Padding is the inner space of an element, and margin is the outer space of an element. The difference becomes clear once you apply backgrounds and borders to an element. Take a look at the visual below: Margin and padding values are set clockwise, starting from the top. 2.

Border CSS Border, our personal favorite CSS attribute, allow you to completely customize the borders that appear around HTML elements. With HTML, it used to be impossible to place a border around an element, except for the table. CSS Borders let you create crisp, customized border styles with very little work, compared to the antiquated methods of HTML. There are numerous types of border styles at your disposal. CSS Code: Display: This is a solid border This is a double border This is a grooved border This is a dotted border This is a dashed border This is an inset border This is an outset border This is a ridged border This is a hidden border This is probably obvious, but the default border-style setting for an element is hidden. To alter the thickness of your border use the border-width attribute. This paragraph has a solid border with a "thick" width. Now for the creative aspect of CSS Borders! This paragraph has a solid border with a color of "blue". This only has a bottom border Try it out!

Readable CSS - Web developer guide Go to Previous Section:SelectorsThis is the 6th section of the CSS Getting Started tutorial; it discusses the style and grammar of the CSS language itself. You change the way your sample CSS file looks, to make it more readable. Information: Readable CSS You can add white space and comments to your stylesheets to make them more readable. White space White space means actual spaces, tabs and new lines. In the context of page layout and composition, white space is the portion of a page that is left unmarked: margins, gutters, and space between columns and lines of type. Your sample CSS file currently has one rule per line, and almost the minimum of white space. The layout you choose is usually a personal preference, but if your stylesheets are part of shared projects, those projects might have their own conventions. Examples Some people like the compact layout that we have been using, only splitting a line when it becomes very long: Some people prefer one property-value per line: Example

Dive into Flexbox Introduction Flexbox is a new layout mode in CSS3 that is designed for the more sophisticated needs of the modern web. This article will describe the newly-stablized Flexbox syntax in technical detail. Browser support is going to grow quickly, so you’ll be ahead of the game when support is wide enough for Flexbox to be practical. Read on if you want to know what it does and how it works! Why is Flexbox needed? Authors have long been using tables, floats, inline-blocks, and other CSS properties to lay out their site content. Specification Status and Browser Support The Flexbox specification has been a work in progress for over 3 years. Flexbox Specification Timeline: July 2009 Working Draft (display: box;)March 2011 Working Draft (display: flexbox;)November 2011 Working Draft (display: flexbox;)March 2012 Working Draft (display: flexbox;)June 2012 Working Draft (display: flex;)September 2012 Candidate Recommendation (display: flex;) Browsers are adopting Flexbox quickly. gistfile1.css order

"Old" Flexbox and "New" Flexbox Just so everyone is clear on this: "Flexbox" (more specifically: CSS Flexible Box Layout Module) has undergone a lot of changes in the last three years. Changes both to the spec and what browsers have implemented. How To Tell If you Google around about Flexbox, you will find lots of outdated information. Here's how you can quickly tell: If you are looking at a blog post (or whatever) about Flexbox and you see display: box; or a property that is box-{*}, you are looking at the old 2009 version of Flexbox. If you are looking at a blog post (or whatever) about Flexbox and you see display: flexbox; or the flex() function, you are looking at an awkward tweener phase in 2011. If you are looking at a blog post (or whatever) about Flexbox and you see display: flex; and flex-{*} properties, you are looking at the current (as of this writing) specification. Examples of Outdated Stuff All this stuff was fantastic at the time it was created, but now is outdated: Support Demo Example of OLD syntax Share On

Hover.css - A collection of CSS3 powered hover effects All Hover.css effects make use of a single element (with the help of some pseudo-elements where necessary), are self contained so you can easily copy and paste them, and come in CSS, Sass, and LESS flavours. Many effects use CSS3 features such as transitions, transforms and animations. Old browsers that don't support these features may need some extra attention to be certain a fallback hover effect is still in place. Licenses Hover.css is made available under a free personal/open source or paid commercial licenses depending on your requirements. To compare licenses please visit the Ian Lunn Design Limited Store and purchase a commercial license. Personal/Open Source For personal/open source use, Hover.css is made available under a MIT license: Use in unlimited personal applications Your application can't be sold Your modifications remain open-source Free updates Read full license Commercial Commercial License Purchase | Read full license Extended Commercial License Purchase | Read full license

Related: