Build a City Skyline - Step 7

Tell us what’s happening:

Hi, I have an issue in executing this code in step 7. I have googled and even tried to find someone to help me with the code but still not executing.Am frustrated coz I have been stuck in this step for the longest now. All I need to know is that am I writing the code correctly or what might be the problem? Please help me out.
Thank You

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">    
  <head>
    <meta charset="UTF-8">
    <title>City Skyline</title>
    <link href="styles.css" rel="stylesheet" />
  </head>

  <body>

<!-- User Editable Region -->

    <div class="background-buildings">
      <div class="bb1"></div>
</div>
<style>
    .bb1{width: 10%;
    height: 70%;}
    </style>

<!-- User Editable Region -->

  </body>
</html>
/* file: styles.css */
* {
  border: 1px solid black;
  box-sizing: border-box;
}

body {
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

.background-buildings {
  width: 100%;
  height: 100%;
}
    

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36

Challenge Information:

Build a City Skyline - Step 7
https://www.freecodecamp.org/learn/full-stack-developer/workshop-city-skyline/step-7

The step is to open your styles.css file and apply this styling there, not in your HTML file.

→ Just a side note: the <style> element should be placed inside the <head> element.

1 Like

[quote=“mbithijoseph555, post:1, topic:756107”]
.bb1{width: 10%; height: 70%;}

The code is not yet responding.

Could you please just write the code for me how it should be

That’s not allowed on this forum.

In any case you have already written the code. Move the code from the style element in the HTML file to the CSS file.

1 Like


What might be the problem? Because I have tried countless times on this step. This stuff is frustrating for real. Please help.

Click “styles.css” button to see the contents of the css file. Thats where you need to copy the style code to.

Thank you for your help. I passed the code finally.

1 Like