CSS Float Right
Posted by CSSFloat in Examples on 10. Jan, 2010 | 0 Comments
Floating an element right is exactly like floating left, except the code is
{float: right;} ie. #floatrightexample {float: right;}
This time we’re going to be floating an image that already has its width defined. Hence, there’s no need to include the width in the CSS code.
Also, did you notice the change in the CSS code?
We used a [...]
CSS Float Left Example
Posted by CSSFloat in Examples on 10. Jan, 2010 | 0 Comments
Here’s an example of using CSS Float to float an item left.
The square below with a blue border is a div tag aptly named “floatleftexample”.
.floatleftexample {float: left; width: 320px; border: 1px solid #00f; margin: 10px;}
In order for the blue square to float left of this text, the floatleftexample div must be above this paragraph in [...]
