background preloader

CSS

Facebook Twitter

9 Valuable CSS Tricks for Responsive Design. CSS also known as Cascading Style Sheets is now an integral part of web development as it allows developers to alter the elements in any web page, which were once impossible. If you know the correct source codes, you can easily make changes in text spacing, underline links and a lot of other stuff, which was non-changeable earlier. Also, responsive designing is getting popular with every passing day thanks to the ever growing popularity of mobile browsing. Today, in this article we will be discussing some of the most valuable CSS tricks that surely plays a significant part in the development and designing of responsive designs. As a developer, you must know that designing a responsive website is not difficult but maintaining it is definitely not an easy task.

Developers must know the art of maintaining a balance in the layout of website and make sure that none of the elements or links are broken. 1. Elimination of ‘Underline’: Below is the simple code to remove the underline: 2. 3. 4. 5. CSS3 Action Framework. It all started when I wanted to do Google CSS3 redesign. The propose of that redesign was to use as much as possible CSS3. I wanted to maintain Google minimalistic style with little Apple flavor and Bing background style. Also to use only pure CSS and CSS3. And the result was: Example: Google CSS3 redesign CSS3 is really powerful tool and many of the things that early were done with some JavaScript library now can be done with CSS3. When I write CSS I usually extract all the best practices and try to make little library so in the next project I will not write the same code over and over again . After the Google CSS3 experiment I decided to spend little more time and make little CSS3 action library(framework).

The library is based on :hover, :active and :target and mainly on CSS3 transforms. Here are some examples: About the code syntax If you have multiple .h-scale values you can personalize your values. How the system works? Example: This div will scale on mouse over and rotate on mouse click 1. CSS3: Animations vs. Transitions. In CSS, you have two techniques for visualizing change that are competing for your attention: Animations & Transitions. In this article, let's examine the similarities and differences between them so that you can know when to use which. To make the most of this article, it would be helpful for you to be familiar with using both animations and transitions. If you haven't had a chance to get your hands dirty with them, the Creating a Simple CSS Animation and Looking at CSS3 Transitions tutorials will help you get started.

Similarities From a distance, both animations and transitions are very similar. Specify which CSS properties to listen for changes on Set timing (easing) functions to alter the rate of going from a one property value to another Specify a duration to control how long the animation or transition will take Programmatically listen to animation and transition-specific events that you can then do with as you wish Visualize CSS property changes. Differences Triggering Looping Share. The Shapes of CSS. Learn Development at Frontend Masters CSS is capable of making all sorts of shapes. Squares and rectangles are easy, as they are the natural shapes of the web.

Add a width and height and you have the exact size rectangle you need. Add border-radius and you can round that shape, and enough of it you can turn those rectangles into circles and ovals. We also get the ::before and ::after pseudo elements in CSS, which give us the potential of two more shapes we can add to the original element. Square Rectangle Circle Oval Triangle Up Triangle Down Triangle Left Triangle Right Triangle Top Left Triangle Top Right Triangle Bottom Left Triangle Bottom Right Curved Tail Arrow via Ando Razafimandimby Trapezoid Parallelogram Star (6-points) Star (5-points) via Kit MacAllister Pentagon Hexagon Octagon Heart via Nicolas Gallagher Infinity via Nicolas Gallagher Diamond Square via Joseph Silber Diamond Shield via Joseph Silber Diamond Narrow via Joseph Silber Cut Diamond via Alexander Futekov Egg Pac-Man Talk Bubble TV Screen Lock.

25 Helpful CSS Grid Frameworks. Advertisement We constantly try hard to search tips, tricks and tutorials, to make your work easy. We have collected some CSS Grid Frameworks in this endeavor. A CSS Framework can support the most complex of layouts by speeding up the development time with its clean grid structure. We have tried to collect as much relevant information as we can. If you like this article, you might be interested in some of our older articles on CSS Typography Tricks, CSS Page Layouts Techniques, and What’s Exciting In CSS3, CSS3 Animation Demos. Prototyping With The Grid 960 CSS Framework More Information on Prototyping With The Grid 960 CSS Framework 1140 grid More Information on 1140 grid CSS Grid Positioning Module More Information on CSS Grid Positioning Module 1KB CSS Grid More Information on 1KB CSS Grid 960 Grid System More Information on 960 Grid System Blueprint More Information on Blueprint YUI 2: Grids CSS More Information on YUI 2: Grids CSS Compose to a Vertical Rhythm A Detailed Look at the 960 CSS Framework.

Creating A CSS3 Dropdown Menu #4. Creating CSS3 Dropdown Menu #4 This is our forth CSS3 menu. This will colored tabs with dropdown submenus (animated with transition effects). Make attention, that all new effects (transitions) will work only in most fresh browsers like FF, Chrome, Safary browsers, possible in Opera too. But not in IE (transitions still not available here).

Here are final result (what we will creating): Here are samples and downloadable package: Live Demo download in package Ok, download our example files (package) and lets start making this menu! Step 1. As usual, we start with the HTML. Index.html Step 2. Here are used CSS styles. Css/style.css Step 3. Here are single background for page: Conclusion Today we made new nice menu (forth), your comments and thanks welcomed. If you enjoy our articles, feel free to share our tutorials with your friends. 20 Super Techniques For CSS Page Layouts. Its our constant endeavor to bring the best of resources for our resources. This article is yet again an effort to do the same by collecting a huge list of CSS Page Layouts. If you are short of time, you can download ready made CSS Page layouts and if you want to add certain personalized touch, we have listed few websites below where you can make a CSS (Cascading Style Sheet), on your own without adding too much effort.

As a developer, you know the importance of respecting the hard work others have put in making these CSS Page layouts. So kindly go through the terms of use before downloading the content. Have a knowledgeable week ahead. If you like this article, you might be interested in some of our older articles on Tips for Writing CSS, What’s Exciting In CSS3, CSS3 Animation Demos and Tutorials, and Comparison Tables. Advertisement Nice and Free CSS Templates This site contains free css templates for your website – Just copy and paste and there you have a stunning website. CSS Layouts. 8 Magical Dynamic and Fluid Layout and How to Make It. Introduction Recently, I have been quite interested with a new kind of web layout - dynamic and fluid layout. It cleverly fills in all the spaces and rearranges each items and display it nicely on browsers, and they usually come with slick animation too.

Some of them even have advance filtering for different categories. I found 8 websites that share the same characteristics and in the last section of this post, I listed 3 jQuery plugins that help you to achieve the same effect as well. Enjoy! Showcase How to do it!!! Alright, I guess you want to know how to do it. jQuery Masonry A dynamic layout plugin for jQuery. Reorder and filter items with a nice shuffling animation. Demo: Pure CSS GUI icons (experimental) A Whole Bunch of Amazing Stuff Pseudo Elements Can Do. 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 will1. 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. Nicolas Gallagher shows us lots of applications of this, including multiple borders, simulating CSS3 multiple backgrounds, and equal height columns. Expand the number of shapes you can make with a single element All of the shapes above any 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. Creating a CSS3 Dropdown Menu #2. Creating CSS3 Dropdown Menu #2 This is our second drop down menu. Today it is in the green palette. The menu will include a submenus that will slide when we hovering the parent elements. That menu will good for green palette templates. And of course – no any JS – only pure CSS. Since this menu is made using CSS3 – it renders perfect on Firefox, Chrome and Safari browsers (possible last Opera will support it too). And, as I read, transitions have been billed to be included in IE10.

Here are final result (what we will creating): Here are samples and downloadable package: Live Demo download in package Ok, download the example files and lets start coding ! Step 1. As usual, we start with the HTML. Index.html Step 2. Here are used CSS styles. Css/style.css Step 3. Our menu using only single image to reach custom backgroundwith and fading effect. Conclusion Hope you enjoyed with this tutorial, don’t forget to tell thanks and leave a comment :) Good luck! Initial idea has been taken from here. 20+ Amazing CSS3 Text Effect Tutorials and Experiments. OK, so you’ve designed that nice web page of yours, picked the right backgrounds and colors for it to set the adequate tone and atmosphere for your visitors or clients, decided on the appropriate icon sets to make the browsing even more accessible, exciting and interesting, but how about the text?

You still haven’t thought about it? If not, don’t despair, because we’re here to help! There is always Photoshop you can create some nice fonts and insert text with, but there is also CSS3 – a very nice style sheet language that can make the browsing experience and thus your website design aspect even better! CSS stands for cascading style sheets and is a great way you can improve the accessibility of the content, provide an enhanced flexibility and control over web elements such as fonts, text and colors. You can create some pretty nice text effects and many more nice stuff with CSS3. Glass Text Effect (refractive index) with CSS3 Fun With CSS Text-Shadow Create Beautiful CSS3 Typography.

An Introduction To CSS3 Keyframe Animations - Smashing Magazine. Advertisement By now you’ve probably heard at least something about animation in CSS3 using keyframe-based syntax. The CSS3 animations module1 in the specification has been around for a couple of years now, and it has the potential to become a big part of Web design. Using CSS3 keyframe animations, developers can create smooth, maintainable animations that perform relatively well and that don’t require reams of scripting. It’s just another way that CSS3 is helping to solve a real-world problem in an elegant manner. In this article, we’ll cover all the important parts of the syntax, and we’ll fill you in on browser support so that you’ll know when to start using it.

A Simple Animated Landscape Scene For the purpose of this article, I’ve created a simple animated landscape scene to introduce the various aspects of the syntax. (NOTE: Versions of Safari prior to 5.1 have a bug that prevents the animation from finishing correctly. The @keyframes At-Rule Here’s the @ rule we’ll be using: Shorthand.

CSS Sprites, What is it and How to use it? You’ve probably heard about CSS sprites, but do you know what they really are and why you should use them? A simple answer is that a sprite is a composition of multiple smaller images into one large image. See the thumbnail of this post for an example. It might sound a little counterproductive to create a larger image, because it might take longer to download it right? Well, that’s not exactly true. CSS Sprites – How It Works Image Courtesy: Image Shack Whenever a user comes to your site, the browser has to load each and single one of the images, unless they are already downloaded.

If you’re sitting on a low latency network, say 50ms, and the web page has 20 images and other external files, it will take a minimum of 20*50*2 = 2 seconds of additional time to load the page, not counting the image size. Most browsers are capable of downloading multiple resources at a time. That’s not much, but when you include the download speed, it goes up to at least half a second. How to Use it Conclusion. How To Use CSS3 Pseudo-Classes - Smashing Magazine. Advertisement CSS3 is a wonderful thing, but it’s easy to be bamboozled by the transforms and animations (many of which are vendor-specific) and forget about the nuts-and-bolts selectors that have also been added to the specification. A number of powerful new pseudo-selectors (16 are listed in the latest W3C spec1) enable us to select elements based on a range of new criteria. Before we look at these new CSS3 pseudo-classes, let’s briefly delve into the dusty past of the Web and chart the journey of these often misunderstood selectors.

A Brief History Of Pseudo-Classes When the CSS12 spec was completed back in 1996, a few pseudo-selectors were included, many of which you probably use almost every day. :link:visited:hover:active Each of these states can be applied to an element, usually <a>, after which comes the name of the pseudo-class. CSS2 Arrives Hot on the heels of CSS1 was CSS24, whose recommended spec was published just two years later in May 1998.

Why Use Pseudo-Classes? Sample Code. Random CSS generator with evolution. @ Learning is bateru. Posted by Larry Battle on January 28, 2011 Hey Guys, What if you could just write HTML and have the CSS generate itself? Well, this question have been bugging me for while, so I decided to program it. Method: The method in which I did so what the following. I wanted to simulate evolution by having the user selecting which CSSJSON object would have offspring, in an attempt to find the perfect css for the html layout. I’m think if I applied statistics to see which traces are favorable over all the selected offspring, then the resulting offspring would come out to being more to want the user wants.

Also, I discovered that the structure of the html and the choice of tags are fundamental to clean and simple design. Issues: Works with Chrome, Firefox and OperaLayout needs some fixing up. Demo: Random CSS generator with evolution Feedback: So what do you think? Be Sociable, Share! Larry Battle Hello, I'm Larry Battle and I love to program, fix problems and discover new technologies. More Posts - Website. Pure CSS Hide and Display HTML Elements without Javascript | Xpert Developer. How to avoid common CSS3 mistakes. 5 Interesting CSS Techniques. 101 CSS Techniques Of All Time- Part 1 - Noupe Design Blog. Nuevas tecnologias de la informacion para el Director de Informatica | Revista IDG-CIO.

Simplify Your CSS With LESS Elements. 20+ Extra Ordinary Designed CSS Websites. The 30 CSS Selectors you Must Memorize. Transparent CSS Sprites - Smashing Magazine. Most Common CSS Mistakes | Web Ninja Wannabe. Are CSS Frameworks Evil? 40 Powerful CSS Techniques You Should’t Miss For Effective Coding. How To Create a Stylish Content Slider using CSS3 & jQuery.

Top 10 CSS3 buttons tutorials. CSS3 Border Images for Beautiful, Flexible Boxes. Working With RGBA Colour. My thoughts on LESS. 47 Amazing CSS3 Animation Demos. Top 10 Tips for Writing Better CSS. 25 Amazing CSS3 Experimentations and Demos.