These are chat archives for FreeCodeCamp/HelpJavaScript

21st
Apr 2018
Brittany Rutherford
@brittanyrutherford
Apr 21 2018 01:08
is there any easy to use js library to copy div content (with styles and how it looks like) to word document, pdf, excel or powerpoint? any of these types?
Christopher McCormack
@cmccormack
Apr 21 2018 01:11
like copying it off the page, or grab the whole page and export?
Brittany Rutherford
@brittanyrutherford
Apr 21 2018 01:21
@cmccormack I have repeating divs
they all look the same
they are tables, with some charts on the right, like a dashboard
so a repeating dashboard representing multiple projects
I want to export each one of these dashboards into its own page/slide in pdf or word or powerpoint
so repeating divs will be as pages in a word document or pdf, with all styles preserved
I saw this library: https://github.com/MrRio/jsPDF .. but it loses the styling as they say, works for basic text content, and it didn't work for me in the first place
Christopher McCormack
@cmccormack
Apr 21 2018 01:24
Have you tried just copy/paste in Word?
Brittany Rutherford
@brittanyrutherford
Apr 21 2018 01:25
I will have too many divs, like probably 20
I want it automated for users
so when they generate a report and see all the 20 divs in the browser, they can just click a button and generate that doc for them
Christopher McCormack
@cmccormack
Apr 21 2018 01:25
hmm
well I don't know of any library, but maybe you can scrape the html as well as any CSS it might be using to create your own page that you can then export
did you make the dashboard?
Brittany Rutherford
@brittanyrutherford
Apr 21 2018 01:27
yes
this is cool
i might try this
well
doesn't preserve styles ..
Christopher McCormack
@cmccormack
Apr 21 2018 01:30
I can see it being a tough problem, maybe you can push what you need to a printable page or something
if it's a dashboard I imagine you're getting data from a backend right?
Brittany Rutherford
@brittanyrutherford
Apr 21 2018 01:31
yeah
what do u mean push to a printable page?
Christopher McCormack
@cmccormack
Apr 21 2018 01:32
have a route to a printable page that has everything you want, or multiple pages with just the elements you want, then maybe use a tool to grab that data and convert it into a pdf or whatever
just throwing out ideas :)
Brittany Rutherford
@brittanyrutherford
Apr 21 2018 01:37
yeah
well, the printable page, is the one I have now
Joseph
@revisualize
Apr 21 2018 01:51
Hey
chu
@ThomasHang
Apr 21 2018 01:52
Hey man,what's up
Dhaval Vira
@dhavalveera
Apr 21 2018 01:52
Hey
figaro790503
@figaro790503
Apr 21 2018 04:02
please i am a new programer, how i use the remainder
i need the explain
hello
lemonfiled
@lemonfiled
Apr 21 2018 04:07
@figaro790503 x%y
figaro790503
@figaro790503
Apr 21 2018 04:08
thanks
lemonfiled
@lemonfiled
Apr 21 2018 04:09

Computational factorial,Where is this wrong

var result=1;
function factorialize(num) {
for(var i=2;i<=num;i++){
result*=i;
}
return result;
}

factorialize(0);

Jason Luboff
@JLuboff
Apr 21 2018 04:09
Factorial of 0 is 0
Sorry forgot it’s 1
Move your variable inside your function
FCC doesn’t like global variables
lemonfiled
@lemonfiled
Apr 21 2018 04:11
@JLuboff thanks
CamperBot
@camperbot
Apr 21 2018 04:11
lemonfiled sends brownie points to @jluboff :sparkles: :thumbsup: :sparkles:
:star2: 2407 | @jluboff |http://www.freecodecamp.org/jluboff
Joseph
@revisualize
Apr 21 2018 04:58
Exact Change is a pain in my arse.
Brad
@bradtaniguchi
Apr 21 2018 05:08
Time to listen to a security talk
anthonygallina1
@anthonygallina1
Apr 21 2018 06:21
Hi
Dhaval Vira
@dhavalveera
Apr 21 2018 06:21
hi
anthonygallina1
@anthonygallina1
Apr 21 2018 06:24
I just saw some thing I thought was super cool in React 16 Any one want to see? It is a video. Helps much with debug And trying to figure out why I just have errors in dev panel and white browser window.
Henry
@GitHub-Henry
Apr 21 2018 06:24
sure
anthonygallina1
@anthonygallina1
Apr 21 2018 06:27
Error handling in react 16 using Error bounderies
I never saw that before I think it will be waaay helpful
i am going to code one tonight So I remember.
anthonygallina1
@anthonygallina1
Apr 21 2018 06:37
I saw some wierd stuff on the net tonight
brb
anthonygallina1
@anthonygallina1
Apr 21 2018 06:42
bk
Brad
@bradtaniguchi
Apr 21 2018 07:04
Man I still don't get the idea behind ngrx (redux design pattern for angular) like is state that complicated?
Rajat
@rajataudichya
Apr 21 2018 08:27
hello people
trying to solve the ceaser cypher challenge using a different logic then mention
can someone tell me what I wrong with this code
``js
``js

function rot13(str) { // LBH QVQ VG!

  var input =("ABCDEFGHIJKLMNOPQRSTUVWXYZ");

  var output =("NOPQRSTUVWXYZABCDEFGHIJKLM");


  for (var i = 0; i < str.length; i++){

   var pehla =  str.charAt(i);



   var dusra = input.indexOf(pehla);

    var chautha = input.charAt(dusra);

    var tisra = output.charAt(dusra);

    var palti = str.replace(chautha,tisra);

    str = palti;

}

  return str;


}

// Change the inputs below to test
rot13("SERR PBQR PNZC");
I am only getting the first word correct :P
Markus Kiili
@Masd925
Apr 21 2018 08:29
@rajataudichya That is actually the best approach to this challenge.
Rajat
@rajataudichya
Apr 21 2018 08:30
@Masd925 can you tell me what is wrong here?
alpox
@alpox
Apr 21 2018 08:31
@rajataudichya when you replace A with N and later comes the letter N which you have to replace with A, you replace instead the letter which you already changed from A to N
Markus Kiili
@Masd925
Apr 21 2018 08:31
@rajataudichya You should test if the character is found on input (indexOf gives >-1) and map it only if it is.
You should not use replace here.
Mohammed Boudad
@matrixersp
Apr 21 2018 08:32
Hey guys,
I know this is out of topic but I don't know where to ask for help
I need your thoughts on this
I'm defining a Mongoose schema (MongoDB) for a carpool platform
here's how it works, drivers post rides and users request rides. Should I put requests and rides separately or use a single schema for both like in this case?
const rideSchema = mongoose.Schema({
    _id: mongoose.Schema.Types.ObjectId,
    driver: { type: mongoose.Schema.Types.ObjectId, ref: 'User', required: true },
    passengers: [{
        passengerId: { type: mongoose.Schema.Types.ObjectId, ref: 'User' },
        seatsNumber: { type: Number, default: 1 },
        validated: { type: Boolean, default: false }
    }],
    pickUp: { type: String, required: true },
    dropOff: { type: String, required: true },
    date: { type: String },
    history: { type: Boolean, default: false },
    createdAt: { type: Date, default: Date.now },
    updatedAt: { type: Date, default: Date.now }
});
Markus Kiili
@Masd925
Apr 21 2018 08:32
@rajataudichya Either a loop or replace, not both.
Rajat
@rajataudichya
Apr 21 2018 08:34
@Masd925 Either a loop or replace not both ? if I don't apply the loop how would I find which index character I need from str and increament it?
Markus Kiili
@Masd925
Apr 21 2018 08:34
@rajataudichya With a loop, you should make a result string or an array of characters.
That way you can map the needed characters.
Rajat
@rajataudichya
Apr 21 2018 08:48
function rot13(str) { // LBH QVQ VG!

  var input =("ABCDEFGHIJKLMNOPQRSTUVWXYZ");

  var output =("NOPQRSTUVWXYZABCDEFGHIJKLM");

  var justLetter = "";

/*  for (var i = 0; i < str.length; i++){

   var pehla =  str.charAt(i);

    justLetter = pehla; 



  }

  var dusra = input.indexOf(justLetter);

    var chautha = input.charAt(dusra);

    var tisra = output.charAt(dusra);

    var palti = str.replace(chautha,tisra);

    str = palti;



  return str;


} */

/// dusra method 

 var fArr = str.split("");



 var sArr = fArr.map(function(val){


    var firstOne = input.indexOf(val);
     if (firstOne !=" "){
       return output.charAt(firstOne);
     }
    else {
      return " ";
    }


  });

     var fStr = sArr.join("");

  return fStr;
}

// Change the inputs below to test
rot13("SERR PBQR PNZC");
this is something new I am trying but the final string is not showing space?
Markus Kiili
@Masd925
Apr 21 2018 09:02
@rajataudichya Just test if the indexOf is >-1 and map the character in that case.
Spaces are not of interest here, only A-Z.
Rajat
@rajataudichya
Apr 21 2018 09:03
got it....

function rot13(str) { // LBH QVQ VG!

  var input =("ABCDEFGHIJKLMNOPQRSTUVWXYZ");

  var output =("NOPQRSTUVWXYZABCDEFGHIJKLM");

  var justLetter = "";



 var fArr = str.split("");


 var sArr = fArr.map(function(val){

       if (val !=" ") { 
    var firstOne = input.indexOf(val);
         if (firstOne < 0){

           return val;
         }

       return output.charAt(firstOne);
    } 
    else {
      return (" ");
    }


  });



     var fStr = sArr.join('');

  return fStr;
}

// Change the inputs below to test
rot13("SERR CVMMN!");
Will try the first method some other day.
Markus Kiili
@Masd925
Apr 21 2018 09:04
@rajataudichya No need to check for a space.
Rajat
@rajataudichya
Apr 21 2018 09:12
it joins every word if I dont use it
Got it...
Thanks @Masd925
CamperBot
@camperbot
Apr 21 2018 09:14
rajataudichya sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4789 | @masd925 |http://www.freecodecamp.org/masd925
Markus Kiili
@Masd925
Apr 21 2018 09:17
@rajataudichya You could refactor it a bit:
function rot13(str) { // LBH QVQ VG!

  var input ="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  var output ="NOPQRSTUVWXYZABCDEFGHIJKLM";

  return str.split("").map(function(val){
    var ind = input.indexOf(val);
    if (ind > -1) return output.charAt(ind);
    return val;
  }).join("");
}
Rajat
@rajataudichya
Apr 21 2018 09:19
@Masd925 I have one doubt as I have not used the method charCodeAt() for this challenge because I believe that knowing the character encode won't be so useful for me but I want to know that how useful is that function in the future challenes?
Markus Kiili
@Masd925
Apr 21 2018 09:21
@rajataudichya You could make another solution that checks the charcode.
Casper Beyer
@caspervonb
Apr 21 2018 09:21
No need to split and map, just use replace.
Markus Kiili
@Masd925
Apr 21 2018 09:22
@caspervonb We discussed that (fine) way also.
monish-u
@monish-u
Apr 21 2018 09:27
Hi guys.. i am new here.. i have a query
Casper Beyer
@caspervonb
Apr 21 2018 09:28
In general; anywhere online just ask and don't ask to ask ;)
monish-u
@monish-u
Apr 21 2018 09:30

i was looking at "title case a sentence".. in browser console this returns expected results. but the freecodecamp tests are not accepting my solution .. what did i do wrong
This is my code. It does print out "Here Is My Handle Here Is My Spout" but fcc not accepting it

function titleCase(str) {
var strCase = str;
var final = "";
var loopstr = "";
strCase = strCase.split(" ");
for(var i=0; i<strCase.length; i++){
loopstr = loopstr + " " + strCase[i][0].toUpperCase() + strCase[i].substr(1,strCase[i].length).toLowerCase();

}
str = loopstr;
return str;
}

titleCase("HERE IS MY HANDLE HERE IS MY SPOUT");

Casper Beyer
@caspervonb
Apr 21 2018 09:32
Please edit that with code blocks (triple backtick's)
monish-u
@monish-u
Apr 21 2018 09:33
function titleCase(str) {
var strCase = str;
var final = "";
var loopstr = "";
strCase = strCase.split(" ");
for(var i=0; i<strCase.length; i++){
loopstr = loopstr + " " + strCase[i][0].toUpperCase() + strCase[i].substr(1,strCase[i].length).toLowerCase();

}
str = loopstr;
return str;
}

titleCase("HERE IS MY HANDLE HERE IS MY SPOUT");
Rajat
@rajataudichya
Apr 21 2018 09:36
@monish-u var final has some issues iguess
because final could be a function in JS
monish-u
@monish-u
Apr 21 2018 09:37
i cleared it and checked now.. still doesnt pass. and it shows expected results in browser console too.
Rajat
@rajataudichya
Apr 21 2018 09:38
what is the output you getting?
Aditya
@ezioda004
Apr 21 2018 09:39
@monish-u You have a trailing whitespace at the beginning of the sentence.
str = loopstr.trim(); should do the trick.
monish-u
@monish-u
Apr 21 2018 09:42
@ezioda004 oh yes.. it's solved now... Thanks !!
CamperBot
@camperbot
Apr 21 2018 09:42
monish-u sends brownie points to @ezioda004 :sparkles: :thumbsup: :sparkles:
:cookie: 542 | @ezioda004 |http://www.freecodecamp.org/ezioda004
Tiago Correia
@tiagocorreiaalmeida
Apr 21 2018 11:21
@RoniqueRicketts got it working?
Ronique Ricketts
@RoniqueRicketts
Apr 21 2018 13:06
@tiagocorreiaalmeida not yet bruv
Tiago Correia
@tiagocorreiaalmeida
Apr 21 2018 15:10
Any issue with the code? Or you didnt had the time yet?
kerafyrm02
@kerafyrm02
Apr 21 2018 15:31
anyone need help?
Tiago Correia
@tiagocorreiaalmeida
Apr 21 2018 15:41
@JLuboff around?
Christopher McCormack
@cmccormack
Apr 21 2018 17:18
@tiagocorreiaalmeida not usually on the weekends
Thomas Tylek
@zippkidd
Apr 21 2018 18:13
I could use some help
I'm having some syntax errors with a for ... in loop
Christopher McCormack
@cmccormack
Apr 21 2018 18:14
@zippkidd sure what's the issue?
Thomas Tylek
@zippkidd
Apr 21 2018 18:15
Hello again @cmccormack ! the statement looks like: for (const channel in streamerData
for (const channel in streamerData) {...}
where streamerData is an array of various channels on TwitchTV
I'm getting the syntax error: "SyntaxError: missing = in const declaration"
Christopher McCormack
@cmccormack
Apr 21 2018 18:17
try using let, not const
Thomas Tylek
@zippkidd
Apr 21 2018 18:17
I'm confused though because I'm using the same syntax on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in
sure, i'll try that
Christopher McCormack
@cmccormack
Apr 21 2018 18:19
is that the only place you are declaring a const?
Thomas Tylek
@zippkidd
Apr 21 2018 18:19
No, but the syntax error directed me to that line of code
It works with let, thanks!
Christopher McCormack
@cmccormack
Apr 21 2018 18:19
I think your syntax should work - can you paste all your code? What developer environment are you using?
ok great
Thomas Tylek
@zippkidd
Apr 21 2018 18:21
It may have to do with the fact that I'm trying to use strict mode
@cmccormack , thanks again!
CamperBot
@camperbot
Apr 21 2018 18:22
zippkidd sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1423 | @cmccormack |http://www.freecodecamp.org/cmccormack
Thomas Tylek
@zippkidd
Apr 21 2018 18:26
Hmm, maybe I shouldn't be using for...in to iterate over an array...
But it's doing what I want it to, so whatever
The code in case anyone is interested:
const streamerData = ["ESL_SC2", "freecodecamp", "OverwatchLeague"];
let url;
//functions
for (let channel in streamerData) {
url = https://wind-bow.glitch.me/twitch-api/streams/${streamerData[channel]}?;
fetch(url)
.then(response => response.json())
.then(response => populate(response));
}
Brad
@bradtaniguchi
Apr 21 2018 18:28
@zippkidd Don't use for in for an array, I heard you can get unexpected outcomes with it. Id use a forEach or for of
Thomas Tylek
@zippkidd
Apr 21 2018 18:29
@bradtaniguchi , I'll switch it to forEach then. thanks for the advice
CamperBot
@camperbot
Apr 21 2018 18:29
zippkidd sends brownie points to @bradtaniguchi :sparkles: :thumbsup: :sparkles:
:cookie: 467 | @bradtaniguchi |http://www.freecodecamp.org/bradtaniguchi
Brad
@bradtaniguchi
Apr 21 2018 18:30

Oh yea this happens:

const test = [1,2,3,4,5];
for (const el in test) console.log(el);
0
1
2
3
4

The code prints out the properties of the array, not whats actually in it

Thomas Tylek
@zippkidd
Apr 21 2018 18:31
I see. However, wouldn't "console.log(test[el])" fix that issue?
Either way, I'll be switching to the forEach loop.
Brad
@bradtaniguchi
Apr 21 2018 18:32
Yea it totally would, but yea id use one of the other like 6 loops for this use case :P
Christopher McCormack
@cmccormack
Apr 21 2018 18:33
Just use for...of much easier :)
Thomas Tylek
@zippkidd
Apr 21 2018 18:34
I can try that too! Here's my forEach loop:
streamerData.forEach(channel => {
url = https://wind-bow.glitch.me/twitch-api/streams/${channel}?;
fetch(url)
.then(response => response.json())
.then(response => populate(response));
});
Henry
@GitHub-Henry
Apr 21 2018 18:34
@bradtaniguchi for in iterates over object properties, for of iterates over object values
Thomas Tylek
@zippkidd
Apr 21 2018 18:35
@GitHub-Henry , thanks for that clarification
CamperBot
@camperbot
Apr 21 2018 18:35
zippkidd sends brownie points to @github-henry :sparkles: :thumbsup: :sparkles:
:cookie: 547 | @github-henry |http://www.freecodecamp.org/github-henry
Henry
@GitHub-Henry
Apr 21 2018 18:35
@zippkidd np
Thomas Tylek
@zippkidd
Apr 21 2018 18:40
The new for of loop for anyone that's interested:
for (let channel of streamerData) {
url = `https://wind-bow.glitch.me/twitch-api/streams/${channel}?\`;
fetch(url)
.then(response => response.json())
.then(response => populate(response));
}
minus that backslash before the last (`)
Thanks again everyone, hopping off for now
Tiago Correia
@tiagocorreiaalmeida
Apr 21 2018 18:49
Hey @cmccormack thanks for the info tough
CamperBot
@camperbot
Apr 21 2018 18:49
tiagocorreiaalmeida sends brownie points to @cmccormack :sparkles: :thumbsup: :sparkles:
:star2: 1424 | @cmccormack |http://www.freecodecamp.org/cmccormack
Tiago Correia
@tiagocorreiaalmeida
Apr 21 2018 18:52
when using mysql with node, what would make sense to create the tables on first run? do a show tables or something to see if they exists if dont run the create tables ? im not sure how should I handle this
Christopher McCormack
@cmccormack
Apr 21 2018 18:55
Would you have data to populate the tables?
Tiago Correia
@tiagocorreiaalmeida
Apr 21 2018 18:57
no just the normal create table and their fields, since in mysql we are forced to create them before use them, mongo has that vantage
its a public tournament
Christopher McCormack
@cmccormack
Apr 21 2018 18:58
you could possibly wait until you do have data, but if you know the shape and all that maybe make it when the server loads. Then you can build your indexes and everything as well
Tiago Correia
@tiagocorreiaalmeida
Apr 21 2018 18:59
yeah wa<s thinking about that gonna run create database if not exists
Christopher McCormack
@cmccormack
Apr 21 2018 18:59
@tiagocorreiaalmeida can't right now but thanks - I have been trying out codefights recently though
CamperBot
@camperbot
Apr 21 2018 18:59
cmccormack sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 522 | @tiagocorreiaalmeida |http://www.freecodecamp.org/tiagocorreiaalmeida
Tiago Correia
@tiagocorreiaalmeida
Apr 21 2018 18:59
arcade mode?
Christopher McCormack
@cmccormack
Apr 21 2018 19:03
uh starting off, not sure
couple quick exercises that's all
10 min turned to 40 min :)
Tiago Correia
@tiagocorreiaalmeida
Apr 21 2018 19:22
ahahaha, there's some that I find interesting Im missing 3 on the arcade mode and half of them on the core one
Tiago Correia
@tiagocorreiaalmeida
Apr 21 2018 19:34
@cmccormack
import mysql from "mysql";

const connection = mysql.createConnection({
    host: "localhost",
    user: "root",
    password: ""
});

connection.query("CREATE DATABASE IF NOT EXISTS todo_api", (err) => {
    if (err) return console.log(`Error creating DB: ${err}`);

    connection.query("USE todo_api", (err) => {
        if (err) return console.log(`Error selecting the DB: ${err}`);

        const tables = {
            users: [
                'id INT NOT NULL AUTO_INCREMENT',
                'name VARCHAR(255) NOT NULL',
                'email VARCHAR(255) NOT NULL UNIQUE',
                'password VARCHAR(255) NOT NULL',
                'created_at TIMESTAMP DEFAULT NOW()',
                'PRIMARY KEY(ID)'
            ],
            todos: [
                'id INT NOT NULL AUTO_INCREMENT',
                'user_id INT NOT NULL',
                'title VARCHAR(255) NOT NULL',
                'description VARCHAR(255) NOT NULL',
                'completed INT DEFAULT 0',
                'completed_at TIMESTAMP',
                'created_at TIMESTAMP DEFAULT NOW()',
                'PRIMARY KEY(ID)',
                'FOREIGN KEY(user_id) REFERENCES users(id)'
            ]
        };

        for (table in tables) {
            connection.query(`CREATE TABLE IF NOT EXISTS ${table}(${tables[table].join()})`, (err) => {
                if (err) console.log(`Error creating table ${table}, err: ${err}`);
            })
        }

    });
});

export default connection;
made it this way not sure if its the best way but :\
good old todo project used to pratice everything... :D
alpox
@alpox
Apr 21 2018 21:20
@tiagocorreiaalmeida best is to handle database schematas with all updates etc. Through migration systems. I suggest you to take a look at knexjs which is a js to sql generator and also provides a good migration tool.
If you want a more extended tool to handle mysql on javascript level, you can take a look at ObjectionJS which sits on top of knexjs and is a very good ORM system (the best i found for js and well designed)
Joseph
@revisualize
Apr 21 2018 22:03
Hey
Brittany Rutherford
@brittanyrutherford
Apr 21 2018 22:44
hello
anthonygallina1
@anthonygallina1
Apr 21 2018 22:45
hello
Brittany Rutherford
@brittanyrutherford
Apr 21 2018 23:30
why would u guys use any js framework, why not code without any of them
why do u need to use angular or vue
jusgoose
@gusd773
Apr 21 2018 23:31
can anybody tell my why my background won't change colors?
<!DOCTYPE html>
<html>
    <head>
            <title>SOCIAL MEDIA TUTORIAL</title>
            <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.10/css/all.css" integrity="sha384-+d0P83n9kaQMCwj8F4RJB66tzIwOKmrdb46+porD/OvrJ+37WqIM7UoBtwHO6Nlg" crossorigin="anonymous">
            <link rel="stylesheet" href="css/main.css">


    </head> 
    <body>
        <header>
            <div>
                LOGO
            </div> <!-- END OF LOGO DIV-->
            <div>
                <ul>
                    <li>
                        <a href="chloe.html">
                            chloe
                        </a>
                    </li>
                    <li>
                        <a href="chloe.html">
                            home
                        </a>
                    </li> 
                </ul>    
            </div> <!-- END OF CHLOE / HOME UL DIV-->
            <div>
                <ul>
                    <li>
                        <a href="chloe.html">
                            <i class="fas fa-users"></i>
                        </a>
                    </li>
                    <li>
                        <a href="chloe.html">
                            <i class="fas fa-comments"></i>
                        </a>
                    </li>
                    <li>
                        <a href="chloe.html">
                            <i class="fas fa-bell"></i>
                        </a>
                    </li>
                </ul>
                <div>
                    <i class="fas fa-lock"></i>
                </div>
            </div> <!-- END OF ICONS UL DIV-->
            <div>
                <ul>
                    <li>
                        <a href="chloe.html">
                            <i class="fas fa-search"></i>
                        </a>
                    </li>
                    <li>
                        <input type="text" name="search">
                    </li>
                    <li>
                        <a href="chloe.html">
                            <i class="fa fa-window-close" aria-hidden="true"></i>
                        </a>
                    </li>
                </ul>
            </div> <!-- END OF END OF SEARCHBOX UL DIV-->
        </header>    
    </body>
</html>


header{
    background: #3B5998;
}
Tiago Correia
@tiagocorreiaalmeida
Apr 21 2018 23:34
Thanks @alpox
CamperBot
@camperbot
Apr 21 2018 23:34
tiagocorreiaalmeida sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:star2: 1604 | @alpox |http://www.freecodecamp.org/alpox
Christopher McCormack
@cmccormack
Apr 21 2018 23:41
@gusd773 did you put your style in a <style> tag?