background preloader

CSS

Facebook Twitter

Learn to Code HTML. Tuts+ Media Queries. LukeW Ideation + Design | Digital Product Strategy & Design. Future-Friendly Thinking. Responsive.is – Display and present responsive web designs. A Book Apart, Responsive Web Design. Foreword by Jeremy Keith Since its groundbreaking release in 2011, Responsive Web Design remains a fundamental resource for anyone working on the web. Learn how to think beyond the desktop, and craft designs that respond to your users’ needs. In the second edition, Ethan Marcotte expands on the design principles behind fluid grids, flexible images, and media queries. Through new examples and updated facts and figures, you’ll learn how to deliver a quality experience, no matter how large or small the display.

What’s new in the second edition? Discover new tips and tricks for browser support, take a closer look at solutions for serving images, explore the role of progressive enhancement in web design, find better methods for managing bandwidth, and more. Follow along with the new examples and approaches Ethan has assembled, and dive in to his meticulously revised code samples. Contents Our Responsive WebThe Flexible GridFlexible Images (Read this chapter online)Media QueriesBecoming Responsive. Bulletproof Web Design: Improving flexibility and protecting against worst-case scenarios with HTML5 and CSS3, 3rd Edition. Sass: Syntactically Awesome Style Sheets. Getting started | Less.js. CSS-Tricks.

A Whole Bunch of Amazing Stuff Pseudo Elements Can Do | CSS-Tricks. By Chris Coyier On June 13, 2011 It's pretty amazing what you can do with the pseudo elements ::before and ::after. For every element on the page, you get two more free ones that you can do just about anything another HTML element could do. They unlock a whole lot of interesting design possibilities without negatively affecting the semantics of your markup. Here's a whole bunch of those amazing things. A roundup, if you will. #Give you multiple background canvases Because you can absolutely position pseudo elements relative to their parent element, you can think of them as two extra layers to play with for every element.

#Expand the number of shapes you can make with a single element All of the shapes above and many more can be created with a single element, which makes them actually practical. Here's an example of a six-pointed star: #Show URL's of links in printed web pages #Clear floats #Simulate float: center; #Label blocks of code with the language it is in #Create an entire icon set. Meet the Pseudo Class Selectors. Pseudo class selectors are CSS selectors with a colon preceding them. You are probably very familiar with a few of them. Like hover: a:hover { } They are immensely useful in a variety of situations. Some of them are CSS3, some CSS2… it depends on each particular one.

Outside of IE, they have great browser support. Link-related pseudo class selectors :link – Perhaps the most confusion-causing link-related pseudo selector. :visited – Selects links that have already been visited by the current browser. :hover – When the mouse cursor rolls over a link, that link is in it’s hover state and this will select it. :active – Selects the link while it is being activated (being clicked on or otherwise activated). There is a fun technique to remember all the link pseudo class selectors. Input & link related pseudo class selectors :focus – Defining hover styles for links is great, but it doesn’t help out those who used keyboard navigation to get to the link.

Position/Number-based pseudo class selectors. When to base64 encode images (and when not to) | David Calhoun's blog. Introduction Ever since Steve Souders started evangelizing web performance, it’s been pounded into our heads that extra HTTP requests add a lot of additional overhead, and that we should combine them if possible to dramatically decrease the load time of our web pages. The practical implication of this has been to combine our JavaScript and CSS files, which is relatively easy and straightforward, but the harder question has been what to do with images. Sprites Image sprites are a concept taken from video games: the idea is to cram a ton of image assets into one file, and rearrange a “viewport” of sorts to view only specific pieces of that file at a time.

For instance, a simple sprite that holds two images might have one viewport that only looks at the top half of the sprite (image #1), and another viewport that only looks at the bottom half (image #2). On the web side of things, this means that those multiple requests have now been combined into one request. Data URIs and Base64 encoding. Sprite Cow - Generate CSS for sprite sheets. Normalize.css: Make browsers render all elements more consistently. CSS Tutorial. CSS Basics.