25 Incredibly Useful CSS Snippets for Developers

CSS is no doubt up there with the most important web languages that we use. While html provides the structure it can be inconsistent and unpredictable across different new and old browsers. Css is where the html is styled though, and where we get creative as well as addressing those inconsistencies. Below is a fantastic list of 25 Css snippets that I am sure you will find extremely useful. Whether you are a veteran web developer, or are just getting your foot in the door of css, they are all well worth checking out. Hide text with text indent This is extremely useful for use for things such as your company logo. Style links depending on file format This snippet is aimed at user experience. Remove textarea scrollbar in IE Internet Explorer has an annoying habit of adding scrollbars to textarea’s even when the textarea’s content is not overflowing. Drop cap Commonplace these days in blogs and news sites is the dropcap. Css Transparency Css Reset by Eric Meyer Image preloader Google Font API
Useful CSS Snippets - webSemantics
author: mike foskett incept: 5th June 2005 last update: 24th September 2012 A few useful snippets for style sheets. Table striping with CSS3 Author: Christopher Schmitt uploaded: 24th September 2012 Stripe every other table row using CSS only: Original testing: Zebra striping tables with CSS3 Prevent unused background images downloading Author: Tim Kadlec uploaded: 18th September 2012 Marking a container, which has a background image, with display:none is insufficient to prevent it being downloaded by the browser. This will prevent the browser automatically downloading the image: Original testing: Media Query & Asset Downloading Results Fix IE text anti-aliasing when using filters Author: Unknown uploaded: 20th March 2012 When using IE's filter property it can remove the anti-aliasing from text. Solution found in the comments of Using IEs filter in a cross browser way CSS hacks targeting IE v6 through to 9 Author: Unknown uploaded: 17th August 2011 Hacks to access specific IE browsers: Alternatively:
Master your CSS3! Ultimate CSS code snippets | djavupixel.com
CSS3 is coming and we as webdesigners should be ready for it! CSS is no doubt one of the most important web languages to style a website. (x)html provides the structure and CSS the style. It is where most of us get creative. Below is a fantastic list of Css snippets that we are sure you will find extremely useful. Css Reset by Eric Meyer Eric Meyer’s css reset has become almost standard. Hide text (to place logo) with text indent Hiding text can be extremely useful to hide company logo. Style links depending on file format Since CSS3 you can style links depending on some rules also called attribute selectors. Remove textarea scrollbar in IE Internet Explorer adds a scrollbars to textarea even when the textarea’s content is not overflowing. Drop cap For hundreds of years, initials have been used to set off the first letter of a chapter or paragraph. Css Transparency Transparency always add a nice touch to the design of your blog. Image pre-loader Resize background image Multiple Background Images
Making Your Footer Stay Put With CSS | Blog | FortySeven Media
One problem I run into pretty frequently when coding a site in to XHTML and CSS is making my footer dock to the bottom of the screen. It’s especially annoying if you have a page that’s short on content and the footer, which happens to be a different color that the body background doesn’t stay at the bottom of the browser window. I can hear you say, “But why don’t you just do a fixed position on it. That’s easy enough.” True, but if you do that then it’s always at the bottom of the screen no matter how tall the window is. So if I have a page with a lot of content that footer shouldn’t show up until the content is done. This tutorial assumes a few things: 1. So first we need to make sure that everything except the footer is inside a container div. <div id="container"><div id="header">Header</div><div id="nav"><ul><li><a href="#">Home</a></li><li><a href="#">Page 1</a></li><li><a href="#">Page 2</a></li></ul></div><div id="content">Content Here. Now, onto the footer. What’s that? Alright!
Related:
Related: