CSS CSS Layout CSS Layout Techniques Float

Jacquelyn Springs
Jacquelyn Springs
6,034 Points

Whats the value supposed to be?

it say float right which it is already and value would that be width?

style.css
/* Complete the challenge by writing CSS below */
img {
  float: right;
}
index.html
<!DOCTYPE html>
<html lang="en">
<head>
  <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">
</head>
<body>
  <header>
    Developer Diane’s Blog
  </header>
  <article>
    <section class="intro">
      <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>
    </section>
    <footer>©2020 Developer Diane.</footer>
</body>
</html>

3 Answers

Jassim Al-Hatem
Jassim Al-Hatem
19,000 Points

It wants the text to wrap around its (the image) right side. So you would use float: left on the image instead of right.

Lukas Mazur
Lukas Mazur
3,577 Points

I am stuck on this part as well. The img {float: left;} does not work either. Anyone got any other tips or suggestions? Thanks

Jassim Al-Hatem
Jassim Al-Hatem
19,000 Points

Are you stuck on the first or second task?

if you're on the first, this should work:

img {
    float: left;
}
Lukas Mazur
Lukas Mazur
3,577 Points

Oh I see. Without the id selector. Thanks for your help Jassim.