Freecodecamp: bug in passing the test with erroneous code

Created on 28 May 2017  ·  5Comments  ·  Source: freeCodeCamp/freeCodeCamp

I passed the test with the following wrong coding - it did not even work correctly: see the image...

image

Challenge Use Responsive Design with Bootstrap Fluid Containers has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<div class="container-fluid">

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, Monospace;
  }

  p {
    font-size: 16px;
    font-family: Monospace;
  }

  .thick-green-border {
    border-color: green;
    border-width: 10px;
    border-style: solid;
    border-radius: 50%;
  }

  .smaller-image {
    width: 100px;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>
https://s3.amazonaws.com/freecodecamp/iphone6-frame.png
<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. "></a>

<p>Things cats love:</p>
<ul>
  <li>cat nip</li>
  <li>laser pointers</li>
  <li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
  <li>flea treatment</li>
  <li>thunder</li>
  <li>other cats</li>
</ol>
<form action="/submit-cat-photo">
  <label><input type="radio" name="indoor-outdoor"> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
  <label><input type="checkbox" name="personality"> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Crazy</label>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>

</div>

help wanted

Most helpful comment

How is the code incorrect? It looks correct to me, everything is wrapped in a div with the class container-fluid

All 5 comments

How is the code incorrect? It looks correct to me, everything is wrapped in a div with the class container-fluid

The opening div should be below the the style. It violates HTML syntax rules, but it will still display properly, which is why it works.

Indeed, I asumed that failure in syntax results in a failure in the compilation. But this assumption does not hold - I checked the code in an html-editor after mihaid85's comment- it displayed properly as well.

I understand now that not all syntax rules are being forced by html.

< div class = " container-fluid " >

< link href = " https://fonts.googleapis.com/css?family=Lobster " rel = " stylesheet " type = " text / css " >
< สไตล์ >
.red-text {
color : red ; }

h2 {
ครอบครัวแบบอักษร : กุ้งก้ามกราม, Monospace ; }

p {
font-size : 16 px ; แบบอักษรครอบครัว : Monospace ; }

. สีเขียว - ชายแดน {
border-color : green ; border-width : 10 px ; border-style : แข็ง ; รัศมีขอบ : 50 % ; }

.smaller-image {
กว้าง : 100 px ; }

< / style >

< h2 class = " red-text " > CatPhotoApp https://s3.amazonaws.com/freecodecamp/iphone6-frame.png
< P > คลิกที่นี่เพื่อ < href = " # " > ภาพถ่ายแมว

< href = " # " > < img ระดับ = "ขนาดเล็กภาพหนาสีเขียวพรมแดน" src = " https://bit.ly/fcc-relaxing-cat " Alt = "แมวสีส้มน่ารักนอนอยู่บนหลังของมัน . " >

< p > แมวที่รัก: < ul >
< li > การหยิกแมว < li > ตัวชี้เลเซอร์ < li > ลาซานญ่า < p > สิ่งที่เกลียดที่สุด 3 เรื่อง: < ol >
< li > การรักษาหมัด < li > ฟ้าร้อง < li > แมวอื่น ๆ < ol >
< form action = " / submit-cat-photo " >
< label > < input type = " radio " name = " indoor-outdoor " > ในอาคาร < label > < input type = " radio " name = "ภายในอาคาร" > กลางแจ้ง < label > < input type = " checkbox " name = " personality " > รัก < label > < input type = " checkbox " name = " personality " > ขี้เกียจ < label > < input type = " checkbox " name = "บุคลิกภาพ" > บ้า < input type = " text " placeholder = " cat photo URL " ต้อง >
< button type = " submit " > ส่ง

I think this issue can be closed @raisedadead. The only possible test that could be added is a test to make sure all the seed code (and only the seed code) is in the div container.

Was this page helpful?
0 / 5 - 0 ratings