This post is about 5 useful CSS properties that you should be very familiar with, but will most likely rarely use. I'm not talking about the new fancy CSS3 properties. I'm referring to the old CSS2 properties such as: clip, min-height, white-space, cursor, and display that are widely supported by all browsers. So, don't miss this post because you might be surprised how useful they are.
1. CSS Clip
The clip property is like a mask. It allows you to mask the content of an element in a rectangle shape. To clip an element: you must specify the position to absolute. Then, specify the top, right, bottom, and left value relative to the element.

Image Clip Example (demo)
The following example shows you how to mask an image using clip property. First, specify the <div> element to position: relative. Next, specify the <img> element to position: absolute and the rect values accordingly.

.clip {
position: relative;
height: 130px;
width: 200px;
border: solid 1px #ccc;
}
.clip img {
position: absolute;
clip: rect(30px 165px 100px 30px);
}
Image Resize and Clip (demo)
In this example, I'm going to show you how to resize and clip images. My original images are in rectangle format. I want to scale it down by 50% to create a thumbnail gallery in a square format. So, I used the width and height property to resize the images and mask them with the clip property. Then, I used the left property to shift the images to the left by 15px.
![]()
.gallery li {
float: left;
margin: 0 10px 0 0;
position: relative;
width: 70px;
height: 70px;
border: solid 1px #000;
}
.gallery img {
width: 100px;
height: 70px;
position: absolute;
clip: rect(0 85px 70px 15px);
left: -15px;
}
2. Min-height (demo)
The min-height property allows you to specify the minimum height of an element. It is useful when you need to balance the layout. I used it on my job board to ensure the content area is alway taller than the sidebar.

.with_minheight {
min-height: 550px;
}
Min-height hack for IE6
Note: min-height is not supported by IE6, but there is a min-height hack.
.with_minheight {
min-height:550px;
height:auto !important;
height:550px;
}
3. White-space (demo)
The white-space property specifies how white-space is handled in an element. For example, specify white-space: nowrap will prevent the text from wrapping to next line.

em {
white-space: nowrap;
}
4. Cursor (demo)
If you change the behavior of a button, you should change its cursor as well. For example, when a button is disabled, the cursor should be changed to default (arrow) to indicate that it is not clickable. So, the cursor property is extremely useful for developing web apps.

.disabled {
cursor: default;
}
.busy {
cursor: wait;
}
.clickable:hover {
cursor: pointer;
}
5. Display inline / block (demo)
In case you didn't know: block elements are rendered on a new line, whereas inline elements are rendered on the same line. <div>, <h1>, and <p> tags are examples of block elements. Examples of inline tags are: <em>, <span>, and <strong>. You can override the display style by specifying display: inline or block.

.block em {
display: block;
}
.inline h4, .inline p {
display: inline;
}
Wow, those are actually very useful :D
LOL using css for years yet I didn’t even know there is a “white-space”! thx for sharing !
good stuff….
Great tips especially about clip property I have never used it before, I always use background property and shift the image. Also thanks for the cursor tip I just found a fix for my site.
thanks, nice tips…
Thanks for the visual on the clip property. Though, I do use the display property quite a bit.
Thanks for the tips! I’ve never seen the clip property before. I’m sure I’ll use it now though!
It’s definitely worth noting that min-height only works if the parent element has either a height or a min-height defined, so at the very least, your body will need to have a height defined even if it’s 100%.
Really great tips. Thanks!
Never heard of “clip” CSS2 property. Hmmmm…
I guess it wasn’t used much by Web designers (a few years ago, I used to study other designers’ code quite often, to learn how they do design/code) at the time I was starting to learn CSS (a few years ago).
Thanks for sharing! :-)
Do you declare the height twice to override the the !important in IE6?
I’d recommend against using the !important hack for IE6. Why penalize other browers when it’s IE that you’re targeting? “!important” means that it will be that more difficult for assistive devices or end-users to override the “height:auto” value if they ever need to.
A better solution for targeting IE and handing it just the value that’s needed?:
Use * html .with_minheight { height: 500px; } to target just IE6. It’s validating CSS and only targets our problem browser.
Use a conditional commented stylesheet to target IE6 only. Again, just targeting IE6 and not introducing cruft to other browsers.
Or simply just use the underscore hack on the height to target only IE6: .with_minheight {
min-height:550px;
_height:550px;
} Technically, this is valid CSS markup, but it won’t pass validators (see w3c recommendation on css browser-extensions). Again, only targets IE6. No cruft added to other browsers.
Hmm. Unfortunately, your system allowed me to add UL and LIs and PRE tags and showed them just fine in the preview, but then ate them on publish. You should fix that. Don’t show me the preview if it won’t take.
Cheers.
great stuff, have been using some of these like min-height,display-inline, cursors for a while now, but it is always great to know about different things.
thanks, great tips
Nice, informative post. I use 4 out of the 5 properties frequently. Never tried clip, but interesting to see it in action.
Hey thanks for this article. I had now idea about CLIP: in css. Now i come to know what is it all about :) thanks
Great tips. Especially the clip property.
Wow nice tips especially the CSS clip. I don’t even know it exist. Thanks!
thx, great article