pf » CSS Techniques Roundup - 20 CSS Tips and Tricks

CSS Techniques Roundup - 20 CSS Tips and Tricks

web

I never cease to be amazed at what problems can be solved with pure CSS. Here are 20 CSS techniques, tips and tricks that you may find handy:

css tips
  1. Rounded Corners
  2. Rounded Corners without images
  3. Creating a Netflix style star ratings
  4. Tableless forms
  5. Styling Lists with CSS
  6. 2 Column Layout Technique
  7. 3 Column Layout with CSS
  8. 3 Column Fixed width centered layout
  9. Printing with CSS
  10. Adding a CSS stylesheet to an RSS feed
  11. Footer Stick
  12. CSS Element Hover Effect
  13. Styling Horizontal Rules
  14. Clearing Floats
  15. CSS Popups
  16. Box Punch
  17. CSS Badge
  18. Orange RSS Buttons with pure CSS
  19. 10 CSS Tricks you may not know
  20. 10 More CSS Tricks you may not know

Do you have other good tips tricks and techniques? Please post them in the comments.

Update: I have started working on a CSS Cheat Sheet that you may find handy.



Related Entries
36 people found this page useful, what do you think?

Trackback Address: 475/FDB718CCCC3382805866DAB9B53B5658
On 09/22/2005 at 2:40:33 PM MDT Sami Hoda wrote:
1
Pete,

Well done! Very useful stuff!

Sami

On 09/22/2005 at 3:28:44 PM MDT Mark Holton wrote:
2
Pete, Great collection of useful references. Your blog continues to be the 'best in class' with regards to web development and ColdFusion as far as I'm concerned. Many thanks.

On 09/22/2005 at 4:10:07 PM MDT Pete Freitag wrote:
3
Thanks Mark and Sami! Your feedback drives me to keep on working at it!

On 09/22/2005 at 4:24:13 PM MDT Big Kev wrote:
4
Pete, this is really useful, about to get a junior developer to start on some look and feel tasks for a new application we are building and this wil save me a lot of time, thanks for the links.

Also updated my site now so hopefully it doesn't offend the colour blind ;-)

Once again cheers.

On 09/22/2005 at 4:34:47 PM MDT Pete Freitag wrote:
5
Thanks Kev, glad to help out. Yeah I saw the update, much easier to read.

On 09/23/2005 at 11:26:49 AM MDT Lorin Rivers wrote:
6
Hey, there's some AWESOME stuff in here...

On 09/23/2005 at 4:45:52 PM MDT Jean wrote:
7
Always great, instructive posts! Thanks a lot.

On 09/23/2005 at 5:38:01 PM MDT Chris wrote:
8
Well, useful stuff, but ALL of them are listed on http://www.alvit.de/handbook/

On 09/27/2005 at 9:32:17 AM MDT zedzdead wrote:
9
Here's a nice little top 10 from Evolt (now that they've got their site back up.....http://evolt.org/node/60369

On 09/27/2005 at 9:50:32 AM MDT Pete Freitag wrote:
10
Hi Chris,

Many of the links I posted here are listed in the link you posted, but not ALL of them. Additionally I am posting different variations on some of the techniques of which I found to be better solutions.

On 10/03/2005 at 5:14:20 AM MDT Ahmed wrote:
11
Excellent job rounding this all up, these really are very useful. You wouldn't believe the amount of time I waste googling all these little hacks and tricks to design a tiny portion of a web site or blog.

Keep up the good work Pete!

On 10/06/2005 at 3:54:28 AM MDT Max wrote:
12
thanks,

a href="http://www.sarkis-webdesign.com"

On 10/24/2005 at 5:54:40 AM MDT Dario de Judicibus wrote:
13
Technique #12 does NOT work for most browsers, since uses CSS features not implemented in most popular browsers.

On 12/23/2005 at 9:24:36 PM MST Jelissa wrote:
14
I appreciate that you keep your site going and allow comments. To me feedback is an interesting part of a website.

http://www.allabouttheworld.com/

On 01/27/2006 at 9:51:11 PM MST bruce wrote:
15
I would love to see this article in a complete, readable/downloadable format so I could save it and use it for reference in the future.

On 01/27/2006 at 11:32:24 PM MST bruce wrote:
16
I would love to see this article in a complete, readable/downloadable format so I could save it and use it for reference in the future.

On 03/21/2006 at 4:07:29 PM MST Asif wrote:
17
Good job!! I wish you guys had a newsletter or something so that every time there is new entry we get the information about it.

On 04/19/2006 at 10:49:41 AM MDT Alex wrote:
18
I was never good in css, but maybe this article can help me - thanks!

Alex http://www.welt-blick.de

On 05/22/2006 at 4:49:19 PM MDT www.resimekle.com wrote:
19
thanks,good job

On 06/20/2006 at 3:15:37 AM MDT Wes wrote:
20
Just occurred to me that I should share this tip:

Any styles that you create using background images should be kept in a separate stylesheet. This saves time when uploading your pages!!

On 07/03/2006 at 6:34:36 AM MDT joshue wrote:
21
body {background-color:ffffff; background-image: url("http://####"); background-position: center center; background-repeat: no-repeat; background-attachment:fixed;}

what should i put to make a 1024X768 image fit to any browser screen size. coz if i put a large image only a portion of it is see, i want it to fit the browser screen, plz help. thank you... email me joshueTM@hotmail.com

On 08/28/2006 at 9:49:43 PM MDT abuhamous wrote:
22
Meridia Go to this page, check both the source and the css files. http://www.cssplay.co.uk/layouts/background.html

On 09/21/2006 at 4:16:04 PM MDT francky wrote:
23
Hi, The #1 method for rounded corners is okay, but not supporting transparency on the outside of the corners. Looking for transparency, and maybe #21? "Liquid Round Corners and other css solutions" can be found on: http://home.tiscali.nl/developerscorner/

On 10/03/2006 at 6:20:20 PM MDT www.elektrotekno.com wrote:
24
that's the so useful tips for this techniques. thank you for information

On 12/12/2006 at 3:52:58 AM MST Jason wrote:
25
I have to say this is superb, thanks so much. Iv used this on a few of my sites. One is http://www.greenlush.com I love the round corners it makes sites looks so smooth. Thanks so much.

On 12/27/2006 at 10:19:50 PM MST webmaster wrote:
26
Internet Marketing and Web Marketing firm that provides you with effective ways to promote your website on all major search engines.

On 01/10/2007 at 7:05:35 PM MST Alina Maßat wrote:
27
Great and excellent article t?s realy helpful. Thanks again.

<a href="http://www.einemillioneurohomepage.de">Onlineshops </a>: Onlineshops

On 04/13/2007 at 1:18:05 AM MDT Yans wrote:
28
Wonderful tips. It would have been helpful if the articles were downloadable. a href="http://www.yansweb.com"

On 04/24/2007 at 4:49:33 AM MDT Praveen wrote:
29
Really great tips.

Learn HTML and CSS with real examples at http://www.blazingnova.com/learnhtml/

http://www.blazingnova.com

On 05/15/2007 at 10:22:02 PM MDT torkant wrote:
30
? by a sun day you a resource is a class !!! if yet admin replied to letter which I wrote him let us help each other < a href= http://gratis-porn.premium10adult.info/blonde-teen.html >blonde teen </a> all whole ? while

On 06/03/2007 at 1:58:14 AM MDT Anonymous wrote:
31
useful tips for this techniques. thank you for information

http://www.vannova.com

On 06/22/2007 at 12:50:46 PM MDT bestdatingoo wrote:
32
Top-Dating.us is a dating directory for singles looking for romance and dating. Meet singles for dating in your area or worldwide. Try most effective and popular online dating services. Over 20 million singles worldwide.We unite online personals, online dating services, international dating, regional dating, ethnic dating, matchmaking websites and traditional dating services agencies in our Top-Dating.us Dating Directory - We are welcome to join us all websites related to dating, romance, singles, relationships, matchmaking, dating personals, etc Adult Dating, International Dating http://top-dating.us

On 07/13/2007 at 7:13:45 PM MDT dik wrote:
33
this one is simple & nice.i

On 07/14/2007 at 10:56:38 PM MDT Loghikeels wrote:
34
Hi! My name is Tomas!

On 07/24/2007 at 1:56:47 AM MDT Foktes wrote:
35
Arreda Ferghuty! Thanks.

On 07/26/2007 at 2:15:49 PM MDT bek wrote:
36
I just wanted to say WOW!u

On 09/05/2007 at 5:54:58 AM MDT perfume wrote:
37
hi great site...

On 09/15/2007 at 1:12:29 PM MDT Mateusz wrote:
38
Good Tips , Regards http://www.audiophile.pl

On 09/18/2007 at 5:06:46 AM MDT wpfreeblogs wrote:
39
For www.petefreitag.com visitors - register free WordPress blog on http://wpfreeblogs.com/ and enjoy!

On 09/22/2007 at 9:39:04 PM MDT sara wrote:
40
Excellent resource you\'ve got here!!! Will definately be back!!!v

On 09/25/2007 at 3:03:14 AM MDT cxbf wrote:
41
I just wanted to say WOW!k

On 10/01/2007 at 12:47:17 AM MDT yang wrote:
42
This is a great tutorial thanks!e

On 10/05/2007 at 7:39:23 PM MDT Bob wrote:
43
Thank you very much.e

On 10/21/2007 at 11:25:06 AM MDT Bill wrote:
44
Really perfect!

On 11/25/2007 at 8:10:03 PM MST meri wrote:
45
Yes! so hold.a

On 12/01/2007 at 4:08:53 PM MST XRumakTheBest wrote:
46
XRumer Platinum Edition is the best program for advertisement! It's have CAPTCHA recognizer, email verificator, and a lot of other functions...

But. I forgot link to it :(

Can you give me link to the XRumer description? screenshots, etc.

Thank you

On 12/10/2007 at 6:40:19 AM MST glory wrote:
47
simple but quality, thanks!

On 12/14/2007 at 9:24:39 AM MST zasw wrote:
48
This is a great tutorial thanks!n

On 12/17/2007 at 6:19:00 PM MST uure wrote:
49
simple but quality, thanks!

On 12/17/2007 at 9:12:54 PM MST meri wrote:
50
Thank you sooooo much!p

On 12/18/2007 at 12:32:47 AM MST Mfunda'makhwela wrote:
51
This site is very useful. I've recently started using CSS. by visiting this site I feel like I know sufficiently enough about CSS and has also answered some web effect questions which have been bugging me

On 12/21/2007 at 1:31:35 AM MST Lamnmangili wrote:
52
Think about what car model and options you want and how much youre willing to spend. Do some research.

On 12/23/2007 at 12:27:46 AM MST djek wrote:
53
Hi our little brothers.)

On 12/29/2007 at 10:01:42 AM MST djon wrote:
54
simple but quality, thanks!f

On 01/14/2008 at 10:57:58 AM MST Momloocadral wrote:
55
Two blondes were going to Disneyland when they came to a fork in the road. The sign read: "Disneyland Left." So they went home.

On 01/15/2008 at 2:44:37 AM MST penis enlargement wrote:
56
I am sorry but this comment is only for you. http://www.penisenlargementl.com

On 01/17/2008 at 4:48:08 PM MST poiu wrote:
57
Hi our little brothers.a

On 01/18/2008 at 6:06:33 AM MST thanks wrote:
58
I am sorry but this comment is only for you. http://www.odakapisi.com

On 01/27/2008 at 9:02:06 AM MST noniWeece wrote:
59
Good site Good luck the web designer.

On 01/28/2008 at 4:33:33 AM MST ModuroMet wrote:
60
Hello! On what a cursor functions this forum works? I is aimed to create Web project about building materials and to make for a WWW site a this script. How to do search? I am necessary wish to find http://buy-or-die.groupusaworld.com/what-diesel-car.html what diesel car but I do not know as to find. I require your participation.

On 02/01/2008 at 11:10:25 PM MST Jennifer wrote:
61
Yes! so hold.i

On 02/06/2008 at 5:55:54 AM MST Oliver wrote:
62
Great and excellent article thats realy helpful. Thanks.

http://www.yapool.de : Heizungen Solaranlagen Schwimmbecken

On 02/09/2008 at 10:18:16 AM MST hiementinia wrote:
63
Please help me to find it http://www.acidjet.org/ice/ in google but it can be in down PS help me +)

On 02/11/2008 at 3:01:07 AM MST blopaup wrote:
64
Hi Excuse if not as it is necessary. Still we will meet! P.S Please PM me information http://vigra.890m.com/ ;)

On 02/21/2008 at 5:17:44 AM MST iou wrote:
65
Yes! so hold.h

On 02/23/2008 at 6:18:47 PM MST djon wrote:
66
simple but quality, thanks!

On 02/23/2008 at 6:39:38 PM MST PLC Programming wrote:
67
Thanks for this informaiton www.plcprogramming.org

On 03/13/2008 at 6:47:08 PM MST Bill wrote:
68
pussy object insertion <

On 03/15/2008 at 6:34:45 PM MST carPlauract wrote:
69
wefwef gerus ger fwwdfwe fwewef repa sured http://growing-cannabis.cn andrelooser

On 03/17/2008 at 3:56:16 AM MST jonetrzzertoss wrote:
70
http://action-man-skateboard.infositsite.com - action-man-skateboard http://chris-cole-andnot-football-nfl-skateboard.infositsite.com - chris-cole-andnot-football-nfl-skateboard http://almost-skateboarding-website.infositsite.com - almost-skateboarding-website http://bam-black-deck-skateboard.infositsite.com - bam-black-deck-skateboard http://audition-create-own-p-skateboard.infositsite.com - audition-create-own-p-skateboard http://blank-skateboard-wood-decks.infositsite.com - blank-skateboard-wood-decks http://best-skateboard-bearings.infositsite.com - best-skateboard-bearings http://bootleg-skateboard-company.infositsite.com - bootleg-skateboard-company http://buy-shoes-skateboarding.infositsite.com - buy-shoes-skateboarding http://charm-city-skateboarding.infositsite.com - charm-city-skateboarding http://clothes-skateboarding.infositsite.com - clothes-skateboarding http://china-great-jump-skateboard-wall.infositsite.com - china-great-jump-skateboard-wall http://cool-skateboarding-icons.infositsite.com - cool-skateboarding-icons http://dc-pink-shoes-skateboarding.infositsite.com - dc-pink-shoes-skateboarding http://dgk-skateboarding-website.infositsite.com - dgk-skateboarding-website There is no unqualified lineage or inventor of the skatefood. One proposed extreffect is that skatefoods arose in the 1940s and 1950s, when children would participate in soapbox (car) races, using soap-boxes united to lifeless foods on mangleskate wheels. When the soap-box became isolated from the ship a, children would rag these unrefined "skateship as". Another suggests that the skateship a was created anon from the suiting of a choose mangle skate enchanted independently and nailed to a 2x4, without the soapbox at all and that it was time after time surfers looking to recreate the characterize oneself as of surfing on the mould when the surf was flat. The skateon has evolved since the sooner almost all produced models in the 1960s. Boards in the gone were time after time made in the aspect of a surffood, with no concavity and constructed of substantial wood,paste, uniform metal. The wheels were for the most part made of a clay composite, or blade and the trucks (axles) were less hardy and initially of a 'distinguish-affray' plan compared to today's 'copy-act'. A skateon is a four wheeled podium employed for the liveliness of skateoning. It is get movingled by pushing with one foot while the other remains on the ship a, or by pumping in structures such as a half-hose or bowl. A skateon can also be inured to by purely stagnant on the deck while on a declining acclivity and allowing reserve to move the food and drive a horser. That being said, the skateon is not without a hitch defined. to most other sports, there is no governing group which declares any regulations on what constitutes a skateship a or the parts from which it is assembled . For protogenre, longship as are a genre of skateship a with a longer wheelbase, and are typically composed of larger and softer wheels. consequently, the acutance of a skateon can change in both aspect and completion as understandably as size. Parts Descriptions of the following skateboard parts are the ones most prevalent in popular, modern forms of skateboarding. Many niche disciplines exist with exotic or alternative constructions and designs that fall outside of much of the descriptions listed. Skateboards are composed of the following parts: [edit - Decks Most decks are constructed with a seven-ply cross-laminated layup of Canadian maple. Sometimes other, more exotic materials, such as fiberglass, bamboo, resin, Kevlar, carbon fiber, aluminum, or plastic are incorporated into deck construction, usually to lighten the board or increase its strength or rigidity. Modern decks are usually 7 to 81/2 inches wide although they can vary. The width of a deck depends on the personal preference of the person who uses it. Most people use 7.5-8 inch wide decks for street skating. Generally, riders use a wider deck for vert, to provide more stability. Skateboard decks are usually between 28 and 33 inches long. The longboard, a common variant of the skateboard, has a longer deck. "Old school" boards (those made in the 1970s-80s or modern boards that mimic their shape) are generally wider and often have only one kicktail. 1970s variants often have little or no concavity, whereas 1980s models have deeper concavities and steeper kicktails. [edit - Grip Tape Grip Tape is used to give a skater's feet more grip on the board. It usually has an adhesive back and a sandpaper like top. [edit - Trucks Attached to the deck are two metal (usually aluminum alloy) trucks, which connect to the wheels and deck. The trucks are further composed of two parts. The top part of the truck is screwed to the deck and is called the baseplate, and beneath it is the hanger. The axle runs through the hanger. Between the baseplate and the hanger are bushings, also rubbers or grommets, that provide the cushion mechanism for turning the skateboard. The bushings cushion the truck when it turns. The stiffer the bushings, the more resistant the skateboard is to turning. The softer the bushings, the easier it is to turn. A bolt called a kingpin holds these parts together and fits inside the bushings. Thus by tightening or loosening the kingpin nut, the trucks can be adjusted loosely for better turning and tighter for more control. [edit - Wheels * The wheels, usually made of polyurethane, come in many different sizes and shapes to suit different types of skating. Larger sizes like 65-90 mm roll faster, and also move more easily over cracks in pavement. Smaller sizes like 48-54 mm keep the board closer to the ground, require less force to accelerate and produce a lower center of gravity, but also make for a slower top speed. * Wheels also are available in a variety of hardnesses usually measured on the durometer 'A' scale. Wheels range from the very soft (about 75a) to the very hard (about 99a). As the scale stops at 100a, any wheels labelled 101a or higher are harder, but do not use the appropriate durometer scale. Some wheel manufacturers now use the 'B' or 'D' scale, which has a larger and more accurate range of hardnesses. * Modern street skaters prefer smaller wheels (usually 48-55mm), as small wheels make tricks like kickflips and ollies easier. Street wheels also need to be quite hard, as small soft wheels absorb too much energy. * Vert skating requires larger wheels (usually 55-65mm) as vert skating involves high speeds that smaller wheels are unable to sustain. Vert wheels are usually very hard, so they can roll faster. As they are only used on ramps and parks that are smooth they are usually on the harder end of the durometer scale. * Slalom skating requires even larger wheels (60-75mm) to sustain the highest speeds possible. They also need to be soft and have better grip to make the tight and frequent turns in slalom racing. * Even larger wheels are used in longboarding and downhill skateboarding. Sizes range from 65mm right up to 100mm. These extreme sizes of wheels almost always have cores of hard plastic that can be made thinner and lighter than a solid polyurethane wheel. They are often used by Skateboard filmers or videographers, as the large soft wheels allow for smooth and easy movement over any terrain. [edit - Bearings Each skateboard wheel is mounted on its axle via two ball bearings. With few exceptions, the bearings are the industrial standard "608" size, with a bore of 8mm, an outer diameter of 22mm, and a width of 7mm. These are usually made of steel, though silicon nitride, a high-tech ceramic, is sometimes used. Many skateboard bearings are graded according to the ABEC scale. The scale starts with ABEC1 as the lowest, 3, 5, 7, 9. It is a common misconception that higher numbers are better for skateboarding, as the ABEC rating only measures tolerances which do not necessarily apply to skateboards. The ABEC rating does not determine how fast or how durable a bearing used for skateboarding will be. In particular, the ABEC rating says nothing about how well a bearing handles axial (side-to-side) loads, which are severe in most skateboard applications. [1 - [2 - [3 - [edit - Hardware Mounting hardware is a set of eight 10-32 bolts, usually an allen or cross head, and matching self-lock nylock nuts. They are used to attach the trucks to the board.

On 04/24/2008 at 8:41:32 AM MDT Amrit Ray wrote:
71
Great stuff. I used a couple of these techniques in our official website. http://www.raycreations.net/ and http://www.hostingitrust.com/




  



Spell Checker by Foundeo





Subscribe to my RSS Feed: solosub RSS
Tags