Tell us what’s happening:
Hey, if float does remove element from the normal flow, why is there that when we float id=left element to the left, existing element to the bottom(id=“right”-one) wouldn’t go up, as if there wasn’t the id=left - element.
I was expecting that removing from the normal flow would mean that remaining elements would occupy the place which floated element freed up. So I deleted the id=“left” to check it and it gave different effect than float.
I don't know If i missed something but would appreciate if just somebody explains me that
Your code so far
<head>
<style>
#left {
float: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>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/applied-visual-design/push-elements-left-or-right-with-the-float-property