scrimba
Applied Visual Design
Push Elements Left or Right with the float Property
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Push Elements Left or Right with the float Property
AboutCommentsNotes
Push Elements Left or Right with the float Property
Expand for more info
index.html
run
preview
console
<head>
<style>
#left {

width: 50%;
}
#right {

width: 40%;
}
aside, section {
padding: 2px;
background-color: #ccc;
}
</style>
</head>
<body>
<header>
<h1>Welcome!</h1>
</header>
<section id="left">
<h2>Content</h2>
<p>Good stuff</p>
</section>
<aside id="right">
<h2>Sidebar</h2>
<p>Links</p>
</aside>
</body>
Console
index.html
-0:46