background preloader

CSS

Facebook Twitter

AtMedia.info - CSS Media Query Generator. Compass CSS3. Element Queries. What's an Element Query? The idea of Element Queries is pretty simple - it's like a Media Query (specifically, the min-width/etc queries), but for a parent or ancestor element, rather than the viewport. This way, you could create a "component" that is styled one way when it's in a narrow container (like a sidebar), but another way when it's got some breathing room (like in the main content of the page), without having to manually specify what kinds of containers are each type - it just naturally happens due to the width of the respective containers.

Circularity The first and most obvious problem with EQs is circularity. There are lots of ways in CSS for an element's width to depend on the size of its contents. In this simple example, the container's size is determined by the size of its contents, because it's floating. In other words, if the child is 500px wide (thus making the container also 500px wide), then the child becomes 400px wide.

Avoiding Circularity Viewport Elements. Create An Animated CSS Box Menu. Posted at Paulund In this tutorial were going to play with CSS transitions to create a new style navigation menu.

Create An Animated CSS Box Menu

The effect we are aiming for is having a number of navigation boxes, and when the mouse hovers over a box this will grow and shrink the other boxes. We can even add an icon to animate into the box to represent the page on the navigation. The HTML. Centering Percentage Width/Height Elements. CSS Tools. Getting creative. In my first article "Designing the Dreaded Form" I discussed planning your forms ahead time by selecting proper UI patterns and handling the dreaded long forms.

getting creative

But the generic title for the article completely left out the “design” part of the form. Although planning ahead is a hugely important part of any design process — the focus on the previous article, this article aims directly at the visual design aspects of the dreaded form. I still do hate designing forms, there really just isn't that much you can actually do with them. Or so you think. The fact really is that forms just get neglected, they are just an after thought. Caption Hover Effects. Today we want to show you how to create some simple, yet stylish hover effects for image captions.

Caption Hover Effects

The idea is to have a grid of figures and apply a hover effect to the items which will reveal a caption with the title, author and a link button. For some of the effects we will use 3D transforms. The aim is to keep the effects subtle and provide inspiration for many different variations. The images used in the demos are Dribbble shots by talented Jacob Cummings. Let's get started. The Markup The structure of our grid and the figures will be made of an unordered list and each item will contain a figure element. This is the default structure for all the grid examples. Getting started with CSS sourcemaps and in-browser Sass editing. CSS sourcemaps allow the browser to map CSS generated by a pre-processor, such as Sass, back to the original source file, including exactly which Sass mixin, placeholder or variable is responsible for a given line of CSS.

Getting started with CSS sourcemaps and in-browser Sass editing

And when you combine sourcemaps with Chrome's new in-browser local file editing (workspaces) and automatic stylesheet reloading, you end up with a very fast in-browser editing workflow. So refill your CSS is awesome mug and boot up Chrome Canary, it's time to get up-and-running with these two new features. Install Sass 3.3+ At the moment sourcemap support is only available in the yet-to-be-released Sass 3.3, which you can install with the following voodoo: With or without sudo, depending on how you roll. Configure Sass. Automatic CSS Testing. General CSS notes, advice and guidelines. CSS Document Anatomy No matter the document, we must always try and keep a common formatting.

General CSS notes, advice and guidelines

This means consistent commenting, consistent syntax and consistent naming. General. CSS3 Multiple Column Layout Module. The Multi Column Layout Module has been introduced to help us create columns quickly and easily using CSS3 only.

CSS3 Multiple Column Layout Module

In this tut I'm going to be taking a look at some of its properties and demonstrate them through a series of examples. Introduction. Sass Style Guide. Posted at CSS Tricks by Chris Coyier With more people than ever writing in Sass, it bears some consideration how we format it.

Sass Style Guide

CSS style guides are common, so perhaps we can extend those to cover choices unique to Sass. Here are some ideas that I've been gravitating toward. Responsive Icon Grid. View Mode Switch. Vertical Timeline. Create An Interactive Metro Style Grid Dashboard. Since Windows 8 released it's first pictures of the new design, people have been going crazy over the metro style.

Create An Interactive Metro Style Grid Dashboard

People love it, it's modern, it's clean, it's simple and makes it really easy to use on mobile devices, especially on tablet devices. Horizontal centering using CSS fit-content value. Further reading: Centering Things The other day I read a good article on horizontal centering by Roger Johansson in where he explains the shrinkwrapping effect.

Horizontal centering using CSS fit-content value

Basically, it's about one of the most common problems you can find in the wild, namely how to center a navigation bar which contains floated elements with undefined widths. As we all know, centering this kind of stuff can be quite tricky sometimes. Tricky Textarea Pulltab. In desktop Safari, Chrome, Firefox, and Opera-under-Presto, (not IE, not mobile anything) <textarea>s have a little resizer nugget in the bottom right corner.

Tricky Textarea Pulltab

Textareas are for writing in, so if users need more space to feel more comfortable writing in there, they can have it. Clicking and dragging that resizer literally changes the box model of that textarea, pushing other things away as needed. How To Style A Checkbox With CSS. Checkboxes is a HTML element that is possibly used on every website, but most people don't style them so they look the same as on every other site. Why not make your site look different by styling your checkboxes, you could even make them look nothing like checkboxes. In this tutorial we are going to create 5 different checkboxes which you can use on your website. To start off we need to add one piece of CSS that each of the following checkboxes will need. We need to hide all the original checkboxes as we will be changing the way they look. The pro's guide to CSS layouts. Posted at .net Magazine by Peter Gasston CSS’s next big challenge is to make flexible, dynamic page layouts that work across our ever-broadening range of devices.

With solutions proposed and under discussion, Peter Gasston offers a snapshot of the future This article first appeared in issue 231 of .net magazine – the world's best-selling magazine for web designers and developers.Developments in CSS are taking the way we display website elements into a new dimension – literally, in some cases. We can rotate and scale elements; animate and transition them; make pages that respond to the capabilities of the device they’re being viewed on.

And we still can’t make a decent grid without unnecessary markup or a lot of trickery. While the web has grown, expanded and multiplied, the most fundamental aspects of laying out a page using CSS haven’t changed since CSS1. In search of the perfect radius. Posted at radesign Few weeks back, I happened to read Chris Coyer's article on nested border radii, which spurred me to do a study that I long wanted to do.

In the figure below, which button looks right? Had you ever had to design such a button or in general, a rounded rectangle nested inside another rounded rectangle and wondered what should be the inner radius for a given outer radius or vice versa? Wrapping Long URLs and Text Content with CSS. Posted at Perishable Press by Jeff Starr To wrap long URLs, strings of text and other content, just apply this carefully crafted chunk of CSS code to any block-level element (e.g., perfect for <pre> tags): By default, the white-space property is set to normal. So you might see something like this when trying to force long URLs and other continuous strings of text to wrap: To force long, continuous strings of text to wrap within the width of our <pre> content (or other block-level element, such as <div> and <p>), we need a different value for the white-space property.

Here are our options:normal – Default value for the white-space property. Although the white-space property is supported by all major browsers, unfortunately many of them fail to apply the property to long strings of continuous text. CSS Architecture. Fly in Newly Added Content to a Page. 5 APIs that will transform the Web in 2013. Stroll.js - CSS3 Scroll Effects. Cross-Browser Inline-Block. Image Rollover Borders That Do Not Change Layout. Posted at CSS-Tricks. Fullscreen Slit Slider with JQuery and CSS3. Preprocess THIS! Making room to breathe: Wrapping Text Around Elements.

Heading Set Styling with CSS. Sass 3.2 makes authoring CSS3 as easy as it will be. Responsive Web Above The Fold. Master your CSS3! Ultimate CSS code snippets. CSS Gradient Background – Cross Browser! Modern Block Quote Styles. Mastering CSS3 Box shadows. Creative Web Typography Styles. Centering Things. Magazine-Like Layout for the Web with CSS Regions and Exclusions. Creating Different CSS3 Box Shadows Effects. CSS Ellipsis: How to Manage Multi-Line Ellipsis in Pure CSS. Receding Background Modal Boxes. Drawing Things with Box-Shadow. How to Create Accordion Menu (CSS3+jQuery) Making a Mosaic Slideshow With jQuery & CSS. CSS3 tucked corners. Dropdown Default Styling. Fonts, fabulous fonts: How to use the @font-face rule with popular font services. 25 Stylish Examples of Web Forms. CSS Tools. Fade Out the Bottom of Pages with a Fixed Position Image. Super-css-super-challenge. Building Books with CSS3. CSS Basics.

Animations-Transitions

Buttons. Navigation. Selectors. Images. Filters.