Computer scienceFrontendCSSBasic propertiesPositioning

Images and Text

Application

Report a typo

Move the red squares to the left and the blue squares to the right using float.

The red squares in the left and the blue squares on the right

Write HTML and CSS code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<div id="container">
<div class="square red">1</div>
<div class="square blue">2</div>
<div class="square red">3</div>
<div class="square blue">4</div>
</div>
</body>
</html>
Completed 1 of 3
The red squares are on the left.
The blue squares are on the right.
___

Create a free account to access the full topic