HTML and CSS Reference
In-Depth Information
The opacity property can make an element and its content transparent.
opacity : <number>
A decimal value between 0.0 and 1.0 is used to set the transparency. With a value
of 1, the element is opaque; 0 renders the element fully transparent, or invisible.
.half-transparent { opacity: 0.5; }
Support for this CSS 3 property is included in Chrome 1+, Firefox 1+, IE9+,
Safari 1.2+, and Opera 9+. IE support can be greatly enhanced using the following filter:
.half-transparent {
filter: alpha(opacity=50); /* IE5-8 */
opacity: 0.5;
The float property detaches an element from its containing element and makes it
float on top of it, either to the left or right side. It is intended for wrapping text around
images, but is also commonly used for making layouts. Floating an inline element
automatically changes it into a block element.
float : none | left | right
To have text and other inline content wrap around an image, you can float it to the
left or right.
<img style="float: left;" src="myimage.png" alt="">
As for layouts, floats allow block elements to be lined up horizontally. For instance,
a grid of boxes can be created with the following class:
.box {
float: left;
width: 100px;
height: 100px;
margin: 0 1em;
background: #ccc;
border-radius: 10px;
Search WWH ::

Custom Search