Example: Float
In this example, the image element is floated to the left and each paragraph element is floated to the right.
Try the following:
- Resize the window to see how the elements are placed when there are different amounts of horizontal space available.
- Change
left
toright
and/orright
toleft
to see what happens.
Note:
Hints:
- undefined
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
<!DOCTYPE html>
<html lang="en">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
p {
margin: 1rem;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX