CSS CSS Layout CSS Layout Techniques Float

Geovani Estacio
Geovani Estacio
1,655 Points


I feel like I am doing what Is asking me to do, but yet is marking my answer as wrong. Can someone tell me why?

/* Complete the challenge by writing CSS below */
<!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Developer Diane's blog</title>
  <link rel="stylesheet" href="page.css">
  <link rel="stylesheet" href="style.css">
    Developer Diane’s Blog
    <section class="intro">
      <img class="small-img" src="developer-diane.jpg" alt="Developer Diane coding on her laptop.">
      <h1>The verdict is in. CSS Layout is great!</h1>
      <p class="clear">I’ve been working with CSS for a while now, and I have to say, it’s pretty awesome. I love being able to separate content from presentation, and to keep all my styles in an external stylesheet.</p>
      <p>I’ve had a pretty good grasp on the basics for a while now, but I needed to learn more about how to control layout with my CSS. Understanding CSS layout meant first exploring the parts of the CSS box model.</p>
    <footer>©2020 Developer Diane.</footer>

1 Answer

John Maxwell
John Maxwell
9,249 Points


This challenge is asking you to target the img element alone. When targeting HTML elements you do not need to include a period, as that is how to target a class identifier. Additionally, for text to wrap around the right side of an element, you need to float: left;. See below, it should help.

img {
float: left;