CSS Library All examples
Welcome to Dynamic Drive's new CSS library! Here you'll find original, practical CSS codes and examples such as CSS menus to give your site a visual boast.
Custom scrollbar colors
In IE5.5+ and above, you can use CSS to customize the color of the scrollbars on the page, which includes various components of the scrollbar. This example shows you the code.
Highlight image hover effect (opacity or borderize)
The first example changes the opacity of any image link when the mouse moves over it using the "hover:" pseudo class of CSS. Note the two different properties used to specify opacity in CSS below. In IE 5.5+, the "filter" property is used (range: 0-100), and in Firefox, "-moz-opacity" (range: 0-1). Both properties are proprietary.
CSS Generated Content
CSS2 supports the insertion of generated content, which is content that's specified using your style sheet and applied dynamically to the page according to your CSS definition. This is very useful for further decorating an element with rich content that should not be part of the page's actual markup.
Floating image with no text wrap
This example shows how to float images (or any content) so that the adjacent text does not wrap around it.
Underline Horizontal Menu
This is a sleek CSS horizontal menu with a popular "underline" effect shown whenever the mouse rolls over a link. Each link (<a>) also carries a background image, used to as the indented line graphic that separates each menu item.
3D CSS buttons
By using an element's border-style CSS attribute to outset, this CSS example shows how to easily create 3D looking CSS buttons that may even appear depressed when the mouse moves over them.
Button Vertical Menu
By giving each menu link a ridge border with contrasting top/left and right/bottom background colors, the result is a slightly beveled button menu.