101 CSS Techniques Of All Time- Part 1

101 CSS Techniques Of All Time- Part 1
101 CSS Techniques designers use all the time to make their web pages just look right.

CSS has fundamentally changed web design, it has provided designers with a set of properties that can be tweaked to make various techniques to make your pages just look right.

Today we are presenting a round-up of 101 CSS techniques designers use all the time. Definitely worth taking a very close look at! This is just the first series , the second part will be coming soon, stay tuned and Enjoy!

Update:

You can check Part2 here.

CSS Sprites

CSS sprites save HTTP requests by using CSS positioning to selectively display composite background images. To maximize accessibility and usability, CSS sprites are best used for icons or decorative effects.

CSS Sprites


CSS Rounded Corners

Rounded corners is one of the most popular and frequently requested CSS techniques. There lots of ways to create rounded corners with CSS, but they always require lots of complex HTML and CSS. Here are easy ways to achieve this effect.


Image Replacements Technique

Thierry Image Placement: Image Placement vs. Image Replacement (FIR)

This technique is mostly for headlines by using CSS to replace normal HTML text, with a background image in order to achieve a particular look.Several different image replacement methods have been proposed, each with their pros and cons.

when you need image replacement you can check the Gilder/Levin Method as described by Dave Shea or, if the replaced text is linked and CSS support for IE/Mac is required, the Gilder Levin Ryznar Jacoubsen IR method.

image replacement


Sliding Doors

Sliding Doors of CSS introduced a new technique for creating visually stunning interface elements with simple, text-based, semantic markup.Beautifully crafted, truly flexible interface components which expand and contract with the size of the text can be created if we use two separate background images.

sliding doors


Sliding Doors” Box– Rounded Corners for All- The goal of this technique was to create rounded-corner boxes with visual flare and the absolute minimal amount of semantically correct markup. While making sure they could resize while keeping their backgrounds intact.

sliding doors


Image Text Wrap Technique

How many times do you have an image floated left in a block of content, but want to keep that content from wrapping around your image?

This technique allows you to wrap around image text flow control to emulate magazine style page layouts.

Image Text Wrap


Equal Height Technique

One of the somewhat frustrating properties of CSS is the fact that elements only stretch vertically as far as they need to. So how can we make all columns appear to be the same height? Several techniques was introduced to solve this issue.

  • Faux Columns- The simple secret is to use a vertically tiled background image to create the illusion of colored columns.
  • Equal Height Columns - revisited- A method to make all columns appear to be the same height but without the need for faux column style background images.
  • Equal height boxes with CSS- The trick is to use the CSS properties display:table, display:table-row and display:table-cell to make containers (in this case div elements) behave like table cells. The basic XHTML structure looks like this:
    
    

    Here is the CSS used to make this structure behave like a table:

         .equal {            display:table;    }    .row {            display:table-row;    }    .row div {            display:table-cell;    }    

Turning A List Into A Navigation bar

Why use a list? Because a navigation bar, or menu, is a list of links. The most semantic way of marking up a list of links is to use a list element. Using a list also has the benefit of providing structure even if CSS is disabled.


Making Headlines With CSS

Headers in Web pages–marked up with h1, h2, h3, h4, h5, or h6 elements–help the reader determine the purpose of sections in content. If your header is visually stimulating, the odds are better that the section will capture your reader’s eye.

heading


  • Heading Style Gallery- Want something a little more stylish for your content headings (h1,h2,…) than a different font or color? Try one of the heading styles listed here to spruce up your content.
  • Typography for Headlines- Improve the typography in your headlines by being more creative, give them more ‘pop’, that sort of thing.
  • Making Headlines With CSS- With a dash of design, we can utilize CSS to stylize those Web page headers to catch the reader’s eye and encourage them to read on.

CSS Shadows Techniques

A technique to build flexible CSS drop shadows that can be applied to arbitrary block elements that can expand as the content of the block changes shape.

  • CSS Drop Shadows-Build flexible CSS drop shadows that can be applied to arbitrary block elements that can expand as the content of the block changes shape.

    CSS Shadows


  • Fun with Drop Shadows- Most of the existing techniques use negative margins, while this one is a really simple version wich uses relative positioning.
  • Drop Shadows By Phil Baines- This set of tests are based on an article found on A List Apart’s technique, but with less CSS coding.
  • CSS Drop Shadows II: Fuzzy Shadows- Picking up where Part I left off, in Part II designer Sergio Villarreal takes his standards-compliant drop-shadow to the next level by producing warm and fuzzy shadows.

    CSS Shadows


  • An improved CSS shadow technique- A very robust and easy-to-use technique for applying snazzy looking shadows using only Web technology and a few little image elements prepared beforehand.

CSS Transparency

One of the trickiest things to control, in a CSS-driven design, is the transparency of the interaction between foreground and background content.Below is a list of the best examples of the differing transparency approaches possible with CSS.

  • Partial Opacity- Placing text over an image can sometimes make it difficult to read, but with Stu Nicholls’s methods the background for the text is made ‘opaque’ using various methods of opacity (including css3) and the black text is then quite readable.

    CSS Transparency


  • Cross-Browser Variable Opacity with PNG- How to overcome flaky browser support for PNG so you can take advantage of this graphic format’s lossless compression, alpha transparency, and variable opacity.
  • Two Techniques for CSS Transparency

Various Link Techniques

  • Showing Hyperlink Cues with CSS- The CSS Guy shows us how to get the little icons next to hyperlinks that signify if that link will take you offsite, open a popup, or link to a file (as opposed to another html page). Here’s how to do it in a way that’s supported in IE7, Firefox, and Safari.
  • The ways to style visited Links- CSS offers various possibilities to make links more usable and preserve text readability at the same time. We need to differentiate visited and unvisited links, but we must keep text scannable and readable.
  • Link Thumbnail- Shows users that are about to leave your site exactly where they’re going. When that curious mouse pointer hovers over a link pointing to somewhere outside of your site, the script displays a small image of the destination page.
  • Iconize Textlinks with CSS- If you’re looking for more icons to implement, Alex provides a nice start.


In the Lab: Doing strange things to CSS Backgrounds
So, last year you might remember me running through some experiments with using percentages to position your background-image in CSS. The short version: Percentages are slightly counter-intuitive but quite powerful — if it wasn’t for IE6-7 sucking by always minutely miscalculating them. In the original post we stuck mostly to the more predictable and commonly-used percentages […]

So, last year you might remember me running through some experiments with using percentages to position your background-image in CSS. The short version: Percentages are slightly counter-intuitive but quite powerful — if it wasn’t for IE6-7 sucking by always minutely miscalculating them.

In the original post we stuck mostly to the more predictable and commonly-used percentages — from 0-100%. Today I thought we might look at some of the interesting things that happen if start to crank those numbers.

Now to be clear, this is mostly ‘theoretical CSS’ in a Stu Nicholls kind of way and probably isn’t stuff you’ll be finding a use for every day. Hopefully it will, at least, be handy for helping you to get a good grip on the subtleties of how percentages interact with images. With luck it might even come in handy at some point in the future.

Let’s look at a starting example, taking a background-image positioned 150% 0%. The zero is a no-brainer, and will obviously place the graphic on the top edge of the box.

For the horizontal position the browser will first locate a spot 50% to the right side of your DIV. It will then find a spot 50% to the right hand side of your image, and align those two points. This will actually have the effect of moving your image back towards (relative to the original point you located).

This means that if the image is small, that offset will also be small and the image will remain mostly, if not entirely hidden beyond the right edge of your DIV.

If the image and DIV are the same size, these offsets will cancel each other out, and the image will be positioned in the horizontal center of it’s DIV.

Howver, if the image is larger than it’s containing DIV, this offset will actually start to move to the LEFT of the containing DIV. Weird but it makes sense if you think about it.

Large percentages in action

Negative percentages work the same way, only to the left of screen.

However it’s when you set your background to tile horizontally that really interesting things start to happen (background-repeat: repeat-x;). While the tiling effect will ensure your image will always be visible, setting large percentages means even a small resize of your browser will translate into a massive repositioning your background graphic. For instance, if your background-position is set to -500%, a 50px increase in your browser will slide your background-image 250px to the left.

Rather than explaining this, it’s easiest to just to demonstrate it via this little example I’ve cobbled together for the The Art and Science of JavaScript book launch.

Start your browser smallish, grab a corner and as you begin to resize the application up and down, you should see an animated ‘diorama’ effect happening around the limo. Each of the ’stage layers’ (i.e. the cityscape, background crowd and foreground crowd) is given a larger negative percentage than the one before it (-100%, -250% and -550% respectively).

The limo is given a positive percentage of 150%, which drives it in and out of the right hand stage as you resize.

Kinda mesmerizing in a Mario Brothers kind of way, isn’t it?

So are ‘resize animations’ the future of the web?

Clearly not, but it does offer a few practical possibilities. I could imagine some nice ideas with site headers where a number of partially-transparent layers were overlayed and positioned with large percentages. Resizing the browser would change the way these layers interacted, perhaps making the header appear radically different at various browser resolutions. As an analog, think of the large changes a small twist can create in a kaleidoscope.

James has also speculated about employing the trick in JavaScript animations.

Even if nothing particularly practical ever comes of it, it was a lot of fun to fiddle with and I think I’ve got a rock solid grasp on how percentages work now. Hopefully it clears things up for a few others too.


*Note: Linux doesn’t re-render the browser when resizing until you release the window edge, so you can’t see this animating effect on a Linux box.

**Note: Apparently most Linux distros show the animation fine. Must be a setting in my Gnome setup.

This article provided by sitepoint.com.


Weekly Links - January 7th
Building a Successful Niche Social Media Website: An Interview With Andrew Egenes of Design Float - by Vandelay Design, this is an interview that will give you several ideas in case you plan to run your own social media site. How To Make Walking Links - by Chris Coyier, a “walking link” is a link with […]

Building a Successful Niche Social Media Website: An Interview With Andrew Egenes of Design Float - by Vandelay Design, this is an interview that will give you several ideas in case you plan to run your own social media site.

How To Make Walking Links - by Chris Coyier, a “walking link” is a link with a dotted underline created by a background image. Upon rollover or active state, the dots become animated and begin to walk.

Chosing color and color schemes - Ultimate Resource List- A web color palettes and color palette generators. From desktop software to web software, its all covered here.

9 Essential Principles for Good Web Design- By PSDTuts, What to look for in a good wed design.

Advanced CSS Printing - Using CSS Page Breaks- By David Walsh, One important aspect of making your pages printer-friendly is by using CSS/XHTML page breaks.

The week in ColdFusion: 16-22 Jan 08: exam time!
So what does the blogosphere have for hard-working ColdFusion developers this week? Firstly, open source projects have been busy. More information about the upcoming version 5 of the FarCry CMS – “FarCry Fortress” – has been released, and it will now have a variety of deployment options which will mean that it can run more […]

So what does the blogosphere have for hard-working ColdFusion developers this week?

Firstly, open source projects have been busy. More information about the upcoming version 5 of the FarCry CMS – “FarCry Fortress” – has been released, and it will now have a variety of deployment options which will mean that it can run more easily on shared hosting accounts, which has long been a bone of contention for many developers. Full details on the Daemonite blog: FarCry: Shared Hosting Made Easy.

On the frameworks front, Steve Nelson – one of the original developers of Fusebox – has written a “one year on” look at his simple CFC-based MVC framework. Apparently it hasn’t changed much, which makes perfect sense when you consider that it was meant to be super simple! Steve even goes so far as to explain how it works in one paragraph (and the final version is pretty short): Steve’s MVC Framework a year later.

Lots of developers are interested in the Ext JS Ajax framework, especially since Ext 1.0 is what does the heavy lifting behind the built in Ajax tags in CF8. Justin Carter has started on an Ext JS tag library for forms, and made some screenshots available. Although he hasn’t released any code yet, Justin is looking for suggestions as to how to proceed with the project so if you’re interested, pop over and see what’s he’s got so far.

Adobe Devnet has been updated with Part 4 of Charlie Arehart’s series of articles on CF8 monitoring: Multiserver Monitor, Admin API monitoring, and more. The first three installments of that series are linked from the article. While we’re in the server monitoring space, FusionReactor 3 has been released, with lots of interesting looking enhancements including a Flex-driven “Enterprise Dashboard”.

And last but not least, if you’re interested in certification, the word on the street is that the ColdFusion 8 exam will be released at the end of this month. Many people have strong opinions on the usefulness of the certification process, but if you’re looking to flesh out your resume it certainly can’t hurt. I’m thinking about swotting up for it – what about you?

This article provided by sitepoint.com.


Sun Buys MySQL For $1 Billion
Reprinted from the Tech Times #182. Open source enthusiasts were reeling this week when Sun Microsystems announced that it will be purchasing MySQL AB, the company behind the development of the popular MySQL database software, for US $1 billion. The spin from both camps was positive, but what does the deal mean for web developers? And what […]

Reprinted from the Tech Times #182.

Open source enthusiasts were reeling this week when Sun Microsystems announced that it will be purchasing MySQL AB, the company behind the development of the popular MySQL database software, for US $1 billion.

The spin from both camps was positive, but what does the deal mean for web developers? And what impact is it likely to have on other open source projects?

To attempt to answer these questions, we need to look at a number of factors, including Sun’s history with open source technologies, its competitors, and the success of other open source technologies that have been commercialized.

While it’s not without its detractors, there’s no denying that Sun has a pretty solid history when it comes to involvement in the open source world. The company claims to be the biggest contributor to the open source community, a claim that, based upon its release of the Solaris source code in 2005, and the Java programming language in 2006, is difficult to refute.

But there is other evidence of Sun understanding the value of keeping software open source and free: projects like OpenOffice.org and NetBeans have healthy communities and promising road maps. In fact, if you examine Sun’s current offerings to the corporate world, the only key component missing from the portfolio (and one that competitors such as Oracle, IBM, and Microsoft already offer) is a database. MySQL, with over 10 million installations worldwide (including high-traffic sites such as Google and Facebook) is a natural fit.

One concern that web developers may have is that the licensing terms will change — what if Sun decides to start charging a licensing fee for each of the installations of MySQL?

In my opinion, this just won’t happen, simply because Sun realizes that it hasn’t bought a database — it’s bought a community. A community of employees, developers, and clients.

Related to this is the question of whether development of the cross-platform releases of MySQL will stagnate, with Sun’s energy being focused on compatibility with the Solaris platform. Here’s what MySQL’s VP of Community Relations, Kaj Arnö, had to say on the matter:

“I don’t expect (the development of MySQL on Solaris) in any way to be at the cost of other popular operating systems (Linux, Windows, Mac OS/X, other Unixes etc.) or development environments (PHP, Ruby on Rails, Perl, Python, ODBC, C++, C#, VB etc.). MySQL grew with LAMP, and MySQL without LAMP at its core is simply unimaginable. It was MySQL’s part of LAMP that interested Sun in the first place. Hence I don’t see Sun having a platform migration strategy, but to continue to be an integral part of the dot in .com.”

In short, Sun understands the business model around open source software, and it wouldn’t have invested $1 billion into a company only to screw over its users for a short-term profit when the long-term prospects — driving MySQL into the corporate arena with paid support — look so bright. There are plenty of other open source databases (PostgreSQL, for example) with comparable features and performance that customers would quickly migrate to if they were unhappy.

And as for the figure paid by Sun? While some would suggest the number was low given the size of the MySQL user base, $1 billion is a lot of money in anyone’s eyes. Let’s take a look at some other recent open source acquisitions [source]:

  • US$210 million for SUSE Linux (Novell)
  • US$400 million for JBoss (Red Hat)
  • US$500 million for XenSource (Citrix)
  • US$350 million for Zimbra (Yahoo!)

I’d say the MySQL team would be feeling pretty happy with themselves right now. Who said there was no money in open source software?

This article provided by sitepoint.com.


Leave a Reply

You must be logged in to post a comment.