background preloader

CSS

Facebook Twitter

15 Best CSS Practices to Make Your Life Easier. CSS was started in 1997 to help website developers create and design their own attractive web pages.

15 Best CSS Practices to Make Your Life Easier

Cascading Style Sheets (CSS) are a type of language used to change the format and look of documents written. There are different types of CSS, but it is widely used and supported on all browsers. When it comes to using CSS, it can be really easy to get yourself into a big mess. Whether it be from all the small changes here and there, or from a messy job to begin with, it can be a struggle to clean it up. To keep the code clean and easy to manage, there are ways to improve the CSS process from start to finish. 3 Basic Types of CSS Stylesheets Inline - Inline style sheets have code that is written into the tag of the document.

Embedded - Embedded style sheets have code that comes 'embedded' into the head of the document. External - These types of style sheets are created in a separate document. Here are 15 best CSS practices 1. When it comes to anything in life, it pays to stay organized. 2. Code a Simple Folded Corner Effect With CSS. This week we have yet another fun and simple CSS project for you to hone your coding chops on.

Code a Simple Folded Corner Effect With CSS

This time around we’ll be creating the illusion of a page with one corner that has been folded over. With the power of pseudo elements, we’ll create some CSS triangles that we can then push into place to create our page fold. Once we’re all finished, you’ll be able to simply apply a class to any div to add in the effect. The Concept Demo: Click here to launch. Recently, I wanted to add a little bit of character to a simple text container and decided to try folding over one of the corners. The method that I came up with is surely not innovative, but I thought it was interesting enough to share here. Once we have the triangles into place, we can change the top triangle to the same color as the background, and suddenly we’ve got our nice little page fold effect.

Now that we have a plan in place, we can begin building our shapes using CSS. The HTML That’s all we’ll need for now. 45 Fresh and Free HTML5 And CSS3 Templates. 5 Useful CSS Tricks for Responsive Design. Making the design to be responsive is very easy as shown in my Responsive Design in 3 Steps tutorial, but maintaining the elements to look aesthetically balanced on all breakpoint layouts is an art.

5 Useful CSS Tricks for Responsive Design

Today I’m going to share 5 of my commonly used CSS tricks along with sample cases for coding responsive designs. They are simple CSS properties such as min-width, max-width, overflow, and relative value — but these properties play an important part in responsive design. View Demos 1. Responsive Video (demo) This responsive video CSS trick was discovered by tjkdesign.com. Diving Into CSS Regions. How to Create a Fast Hover Slideshow with CSS3. A little fast-running image slideshow that plays on hover and pauses when mousing out.

How to Create a Fast Hover Slideshow with CSS3

The current image will stay visible. View demo Download source Today I want to share a little hover slideshow with you. The main idea is to run a super-fast image slideshow on hover and show the current image when mousing out. Mastering CSS Gradients in Less Than 1 Hour. Have you refrained from using CSS Gradients because either you didn’t understand them, or thought the browser support for them wasn’t good enough to consider using them in your projects?

Mastering CSS Gradients in Less Than 1 Hour

Well, it’s time to kill those 1px wide images, my friend. If you’re just curious about how to use CSS Gradients, this is the place for you. We’ll start with the basics of syntax to very advanced effects with lots of tips and examples. How to Build an Accordion Image Gallery with only CSS. Fluent animated transitions for sliding web page elements such as a menu or an image gallery, have always traditionally been implemented with JavaScript.

How to Build an Accordion Image Gallery with only CSS

But using the CSS3 pseudo-class :target and the negation pseudo-class :not() properties, together with the CSS3 Transition Module you can achieve the same effect, but without JavaScript! This means that the very popular “accordion or toggle” effects can be easily implemented using only CSS! In the following CSS workshop we will build an accordion image gallery to show you how all it all works! This is what we will build… …and you can also have a quick look at the Demo before we start. Lets get started… The HTML structure Getting started, the basic HTML structure of the image gallery has three left menu items, consisting of an header element h2, a paragraph p and a span element.

<ul class="imageMenu"><li id="tasmania01"><h2><a href="#tasmania01">Tasmania 01</a></h2><p><span>Place: Tasmania, Date: 2008, Name: Tasmania 01, ... Finished! CSS Tutorial.