These are chat archives for FreeCodeCamp/Help

24th
Sep 2017
piteto
@piteto
Sep 24 2017 00:00
you buy it from a domain name service provider @ismailhozain
or, do you mean setting up ismailhozain.github.io?
Ismail Hozain
@ismailhozain
Sep 24 2017 00:01
i am using surge.sh which is free
but it is not working out in my command prompt
@piteto
piteto
@piteto
Sep 24 2017 00:02
@ismailhozain you still need to buy a domain and then set it up with surge.sh from what I understand. They don't give you domain names for free
Ismail Hozain
@ismailhozain
Sep 24 2017 00:03
image.png
that is not my issue my issue is getting the thing to the web
that green link is not working
@piteto
piteto
@piteto
Sep 24 2017 00:05
I don't know how to connect to a custom surge.sh domain
I use github.com
Ismail Hozain
@ismailhozain
Sep 24 2017 00:06
that is not what i am talking about i need to get it to the web with whatever domain they give me i just need to get it there
piteto
@piteto
Sep 24 2017 00:09
do you have an index.html file at the root of your path?
c:/users/ismai/desktop/expermi/index.html
Ismail Hozain
@ismailhozain
Sep 24 2017 00:16
i have a .html file in the folder
it was made in sublime
@piteto
piteto
@piteto
Sep 24 2017 00:18
it needs to be named index.html or your page at http://smoggy-sugar.surge.sh won't load
@ismailhozain
Ismail Hozain
@ismailhozain
Sep 24 2017 00:18
ok
piteto
@piteto
Sep 24 2017 00:18
This is where I found that issue: sintaxi/surge#245
Ismail Hozain
@ismailhozain
Sep 24 2017 00:23
ok thanks it worked
piteto
@piteto
Sep 24 2017 00:24
you're welcome
Gustavo Santana
@santanaG
Sep 24 2017 01:55

Does anyone here feel like they understand the following code?

function flatArray([x,...xs]){
  return x ? [...Array.isArray(x) ? flatArray(x) : [x],...flatArray(xs)]
          : [];
}

I have a specific question about when the ternary operator evaluates to false ([x],…flatArray(xs)])

Jan Shah
@JanShah
Sep 24 2017 01:56
@santanaG it's a bit deep
readable though
Gustavo Santana
@santanaG
Sep 24 2017 01:57
@JanShah In principle I understand what it is doing and why but two things are annoying me if you might be able to help
Jan Shah
@JanShah
Sep 24 2017 01:57
go on
Gustavo Santana
@santanaG
Sep 24 2017 01:58
@JanShah why are we returning the element enclosed in an array ( [x]) instead of just the element x by itself?
All I can tell for sure is that it breaks because at some point the code attempts to perform something on the x element that it cannot do when flattening this array: [[],[1,2],[3,[4,5]],[6,7,[[[8],9]]],10]
Jan Shah
@JanShah
Sep 24 2017 02:01
one sec, let me run it so I can understand better
does it fail the test on this array?
@santanaG
Gustavo Santana
@santanaG
Sep 24 2017 02:03
@JanShah When you take ([x],…flatArray(xs)]) and make it into ( x,…flatArray(xs)])
it fails
korzo
@korzo
Sep 24 2017 02:12
@santanaG yes
Gustavo Santana
@santanaG
Sep 24 2017 02:14
@korzo I do not understand why it needs to be enclosed in an array
korzo
@korzo
Sep 24 2017 02:14
@santanaG because you have to return array
Gustavo Santana
@santanaG
Sep 24 2017 02:15
@korzo Yes, but why?
korzo
@korzo
Sep 24 2017 02:19
@santanaG you have return at the start of the line. It mean that you have to return array.
Inside [] it makes destructing
so it has to be enclosed in []
Eric Miller
@ericmiller777
Sep 24 2017 03:11
anyone wanna help whith somthing that i think is simple just
how can i make those images tay in their divs
trying to make it responsive
Eric Miller
@ericmiller777
Sep 24 2017 03:16
<body>
<div class="container">
<div id="bigCircle">
<div class="row">
<div class="col">
<div>
<img class="img-responsive" src="greenCircle.png" alt="Green Circle">
</div>
<div>
<img class="img-responsive" src="redCircle.png" alt="Green Circle">
</div>
</div>
<div class="col">
<div>
<img class="img-responsive" src="yellowCircle.png" alt="Green Circle">
</div>
<div>
<img class="img-responsive" src="blueCircle.png" alt="Green Circle">
</div>
</div>
</div>
</div>
</div>
i tryed without that many divs either lol
Bashir Harrell
@bookofbash
Sep 24 2017 03:22
Hi everyone having trouble with learnyounode, the module section
Gustavo Santana
@santanaG
Sep 24 2017 03:27
@korzo @JanShah Thanks for the assistance! I think I have it down after a few dozen times running different input through the function within chrome dev tools
CamperBot
@camperbot
Sep 24 2017 03:27
santanag sends brownie points to @korzo and @janshah :sparkles: :thumbsup: :sparkles:
:cookie: 540 | @korzo |http://www.freecodecamp.com/korzo
:cookie: 547 | @janshah |http://www.freecodecamp.com/janshah
Bashir Harrell
@bookofbash
Sep 24 2017 03:32

This is what i'm getting module.exports = function (directory, extName, function(err,files){
^^^^^^^^

SyntaxError: Unexpected token function

const fs = require("fs");
const path = require("path");
const ext = "extType."+(process.argv[3]);
const directory = (process.argv[2]);
const extName = path.extname(ext);

module.exports = function (directory, extName, function(err,files){

    if (err){throw err;}
    //Gives Error if there is an error
    files.forEach(function(file) {
        if ( file.includes(extName)){
        return(file);
        }
    });
})
Ken Haduch
@khaduch
Sep 24 2017 04:06
@bookofbash - did you just try this: export function(directory, extName, function(err, files){ ? I'm not too familiar with modules and export, but that is the type of example that I see in some docs that I was looking at.
Bashir Harrell
@bookofbash
Sep 24 2017 04:18
@khaduch That didnt work im looking at the assignment and it specifically callas for module.export = function (){...}
Ken Haduch
@khaduch
Sep 24 2017 04:21

@bookofbash - this might not help, either, but on nodeschool/discussions#1304 one of the comments says:

The expression "module.exports" should be on the first line of your module and all the requirements inside the brackets.

I don't know if that is going to help?

Bashir Harrell
@bookofbash
Sep 24 2017 04:22
@khaduch Thanks Im checking it out now
CamperBot
@camperbot
Sep 24 2017 04:22
bookofbash sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3311 | @khaduch |http://www.freecodecamp.com/khaduch
Darren
@DarrenfJ
Sep 24 2017 04:55
evening fCC
Gersho
@Gersho
Sep 24 2017 04:55
:wave: Darren
Darren
@DarrenfJ
Sep 24 2017 04:55
@Gersho hey buddy
how goes it?
Gersho
@Gersho
Sep 24 2017 04:58
nothing much, slowing down a bit on the python/js because while it's fun, my react isn't making much progress
Darren
@DarrenfJ
Sep 24 2017 05:00
I hear yah
I'm always trying to learn a few too many things simultaneously
Gersho
@Gersho
Sep 24 2017 05:00
by the way, is there a way in gitter to mark all notification as read ? it's annoying when starting the day to have to go to each channel to cancel stuff i had no intention to read in the first place
Darren
@DarrenfJ
Sep 24 2017 05:01
you mean the 100 unread message?
Gersho
@Gersho
Sep 24 2017 05:01
yes, but for every rooms at once
Darren
@DarrenfJ
Sep 24 2017 05:01
mine has a x beside it and i can kill it that way
hmmm, be nice to have something for every room
good Q
image.png
that first one suggests you can change it
but when i go into configure defaults it doesn't come up as an option
Gersho
@Gersho
Sep 24 2017 05:04
you can change how it shows up or not, but i want it to show up as normal during the day, i just don't want to deal with 7 rooms to clear every day
maybe i should try switching the option before logging off, and turn it back when i log in
Darren
@DarrenfJ
Sep 24 2017 05:06
that third drop down option seems to make it go away
image.png
i'm gonna leave the room and if oyu type some stuff i can see if it gives me the count
Gersho
@Gersho
Sep 24 2017 05:07
is that so ?
Darren
@DarrenfJ
Sep 24 2017 05:08
seems to do it
i did it here and in the main room and it makes the 100 go away
and when your message came up it just showed as a dot with no number in it
Eric Miller
@ericmiller777
Sep 24 2017 05:08
@Gersho @DarrenfJ how can i get images aligned in a bootstrap col?
Darren
@DarrenfJ
Sep 24 2017 05:09
mind you, you lose the 'all notifications
Eric Miller
@ericmiller777
Sep 24 2017 05:09
ignore all the divs
lol
Gersho
@Gersho
Sep 24 2017 05:09
both are the same size i'll assume ?
Eric Miller
@ericmiller777
Sep 24 2017 05:09
yea
took a few day break from simon
Darren
@DarrenfJ
Sep 24 2017 05:09
@Gersho fyi this is what it looks like
Gersho
@Gersho
Sep 24 2017 05:09
i had tried with col but had to give up because i couldn't manage to get the centerpiece right
Darren
@DarrenfJ
Sep 24 2017 05:09
image.png
just the donut/dot
Eric Miller
@ericmiller777
Sep 24 2017 05:09
<body>
<div class="container">
<div id="bigCircle">
<div class="row">
<div class="col">
<div>
<img class="img-responsive" src="greenCircle.png" alt="Green Circle" style="float: left">
<img class="img-responsive" src="redCircle.png" alt="Green Circle" style="float: right">
</div>
<div class="col">
<img class="img-responsive" src="yellowCircle.png" alt="Green Circle" style="float: left">
<img class="img-responsive" src="blueCircle.png" alt="Green Circle" style="float: right">
</div>
</div>
</div>
</div>
<script>
Gersho
@Gersho
Sep 24 2017 05:10
cool i'll try Darren thanks tomorrow ^^ @DarrenfJ
CamperBot
@camperbot
Sep 24 2017 05:10
gersho sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2047 | @darrenfj |http://www.freecodecamp.com/darrenfj
Gersho
@Gersho
Sep 24 2017 05:10
wait a sec that sentence makes no sense
i'll try tomorrow
Darren
@DarrenfJ
Sep 24 2017 05:10
@ericmiller777 you in bootstrap 4.0?
Gersho
@Gersho
Sep 24 2017 05:11
@ericmiller777 oh it's because you put both in the same one
Darren
@DarrenfJ
Sep 24 2017 05:11
@Gersho :D
Eric Miller
@ericmiller777
Sep 24 2017 05:11
bootstrap 3 but ill change to 4 if it will help
Gersho
@Gersho
Sep 24 2017 05:11
separate the 2 rows
Darren
@DarrenfJ
Sep 24 2017 05:11
naw. was gonna saw i don't know 4 enough
Eric Miller
@ericmiller777
Sep 24 2017 05:11
theres only 2 rows?
Gersho
@Gersho
Sep 24 2017 05:11
one div for each color, you'll use col twice as much
Darren
@DarrenfJ
Sep 24 2017 05:12
@ericmiller777 but apparently I don't know bootstrap either lol!
cause i thougth you had to define the size of each col
Gersho
@Gersho
Sep 24 2017 05:12
also why using an image ?
Darren
@DarrenfJ
Sep 24 2017 05:12
<div class="col">
Gersho
@Gersho
Sep 24 2017 05:12
no if you put no size it assumes all col are the same size
so if you have 2 it'll assume 6
Eric Miller
@ericmiller777
Sep 24 2017 05:13
you think I should just use a botton or a div?
Gersho
@Gersho
Sep 24 2017 05:13
and you can combo it with numbered ones , like col-1 + col + col + col-1 would have the 2 center col to be 5 each
Eric Miller
@ericmiller777
Sep 24 2017 05:13
i just cant get the shape right?
Gersho
@Gersho
Sep 24 2017 05:13
i went for a square div and border radius
Eric Miller
@ericmiller777
Sep 24 2017 05:13
oh
Gersho
@Gersho
Sep 24 2017 05:14
but let's say you keep images, the most important is the cols
Eric Miller
@ericmiller777
Sep 24 2017 05:14
like top left boardewre radius you can do right?
Darren
@DarrenfJ
Sep 24 2017 05:14
ah i thought you should define the size for everything
Eric Miller
@ericmiller777
Sep 24 2017 05:14
you know i will switch to that
but
Darren
@DarrenfJ
Sep 24 2017 05:14
thanks for the tip @Gersho
CamperBot
@camperbot
Sep 24 2017 05:14
darrenfj sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 447 | @gersho |http://www.freecodecamp.com/gersho
Eric Miller
@ericmiller777
Sep 24 2017 05:14
I would like to know how to do this
Gersho
@Gersho
Sep 24 2017 05:14
you should do
first row
col .... col
second row
col ... col 
rather than 
both row
col...col
hangon a sec i'll need to recheck my code :P i'm not good enougth at css to know them perfect
Eric Miller
@ericmiller777
Sep 24 2017 05:15
<div class="col">
<div>
<img class="img-responsive" src="greenCircle.png" alt="Green Circle" style="float: left">
</div>
</div>
<div class="col">
<div>
<img class="img-responsive" src="redCircle.png" alt="Green Circle" style="float: right">
</div>
</div>
like that?
Gersho
@Gersho
Sep 24 2017 05:16
yeah, and the 2 other colors in another row (so there will be 2 "lines")
assuming green is the top left one
#green {
    height: 245px;
    width: 245px;
    border-top-left-radius: 100%;
    border-color: black;
    border-width: 14px;
    border-style: solid;
}
Darren
@DarrenfJ
Sep 24 2017 05:17
brb... puppies are demanding attention
well itll update in a sec
Gersho
@Gersho
Sep 24 2017 05:17
(coloration is in another class to allow color change on activation)
Eric Miller
@ericmiller777
Sep 24 2017 05:18
the images are not shrinking toi the size of the div tho....
yea i just remembered you can do the specific boarder radius's
thank you will make the project much easier
Gersho
@Gersho
Sep 24 2017 05:18
might be some conflict between imposed size, col and img-responsive i guess ? i'm not good at css :P
Eric Miller
@ericmiller777
Sep 24 2017 05:19
but these images driving me crazy
it could be i just made the buttons too big
Gersho
@Gersho
Sep 24 2017 05:19
i went for background color for each div
Eric Miller
@ericmiller777
Sep 24 2017 05:19
i know theres a way to do it tho
Ill probably make a button if i can
Gersho
@Gersho
Sep 24 2017 05:20
i don't use buttons much, i mostly use clickevent on divs
Eric Miller
@ericmiller777
Sep 24 2017 05:20
i mostly use buttons, its pretty much the same
Gersho
@Gersho
Sep 24 2017 05:21
yeah
as long as it gets the job done
Eric Miller
@ericmiller777
Sep 24 2017 05:50
@Gersho thanks
CamperBot
@camperbot
Sep 24 2017 05:50
ericmiller777 sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 448 | @gersho |http://www.freecodecamp.com/gersho
Eric Miller
@ericmiller777
Sep 24 2017 05:51
@DarrenfJ thanks
CamperBot
@camperbot
Sep 24 2017 05:51
ericmiller777 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2048 | @darrenfj |http://www.freecodecamp.com/darrenfj
Eric Miller
@ericmiller777
Sep 24 2017 08:21
https://ericmiller777.github.io/Simon_Game_freeCodeCamp/ how can i center those buttons in the center.... I know i've done it before....
Gersho
@Gersho
Sep 24 2017 08:23
margin-top ? or margin alone ? something like that i guess
or having it's position dependant on it's parent (assuming the circle is parent)
Eric Miller
@ericmiller777
Sep 24 2017 08:32
I know it has somthing to do with that
i dont remember
maybe its just too late
Gersho
@Gersho
Sep 24 2017 08:33
well i haven't looked too much about how you did it, but margin-top should do the trick (prefer % values or it might not work when screen size changes)
Johnny
@JohnnyBizzel
Sep 24 2017 09:11
@ericmiller777 You could use margin-top: 20vh;
Eric Miller
@ericmiller777
Sep 24 2017 09:13
@Gersho thanks
CamperBot
@camperbot
Sep 24 2017 09:13
ericmiller777 sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 452 | @gersho |http://www.freecodecamp.com/gersho
Eric Miller
@ericmiller777
Sep 24 2017 09:13
@JohnnyBizzel thanks
Johnny
@JohnnyBizzel
Sep 24 2017 09:20
@ericmiller777 :+1:
@ericmiller777 Maybe revise these: https://www.w3schools.com/cssref/css_units.asp
Daniel
@dkapexhiu
Sep 24 2017 09:52

@dkapexhiu
hi to all! how to make the footer full width?

<footer id="footer">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<center><div id="footerp"><p>© Copyright 2017</p></div></center>
</div>
</div>
</footer>

Tiago Correia
@tiagocorreiaalmeida
Sep 24 2017 11:07
@dkapexhiu
since you are using bootstrap you can use cntainer-fluid as parent div
before row use container-fluid
Daniel
@dkapexhiu
Sep 24 2017 12:51
@tiagocorreiaalmeida i have used it now without success
Moisés Man
@moigithub
Sep 24 2017 12:52
make sure that block is not nested nside a div.container
right click.. inspect element.. check the box model.. for padding or margins, if all ok.. then check its parent
LydaTech
@lydatech
Sep 24 2017 13:13
@dkapexhiu
<div class="container-fluid">
  <section class="row">
    <div class="col"></div>
    <div class="col"></div>
    <div class="col"></div>
  </section>
  <section class="row">
    <div class="col"></div>
    <div class="col"></div>
    <div class="col"></div>
  </section>
  <footer class="row">
    <div class="col"></div>
  </footer>
</div>
LydaTech
@lydatech
Sep 24 2017 13:18
Daniel
@dkapexhiu
Sep 24 2017 13:48
@lydatech thank you very much
CamperBot
@camperbot
Sep 24 2017 13:48
dkapexhiu sends brownie points to @lydatech :sparkles: :thumbsup: :sparkles:
:star2: 2467 | @lydatech |http://www.freecodecamp.com/lydatech
George Fandridis
@fandridis
Sep 24 2017 14:32
@ldocherty1 a jsfiddle would be very helpful yeah :)
Darren
@DarrenfJ
Sep 24 2017 14:46
sorry guys, got back late.. @Gersho @ericmiller777 just to finish the discussion.. i use click events on divs as well instead of buttons...
thanks for the disc.. gleaned some good tips @Gersho @ericmiller777
CamperBot
@camperbot
Sep 24 2017 14:47
darrenfj sends brownie points to @gersho and @ericmiller777 :sparkles: :thumbsup: :sparkles:
:cookie: 302 | @ericmiller777 |http://www.freecodecamp.com/ericmiller777
:cookie: 453 | @gersho |http://www.freecodecamp.com/gersho
Liam Docherty
@ldocherty1
Sep 24 2017 16:25

When I adjust my media query height % nothing happens to the height of my image. Is my max sizes correct?

// Extra small devices (portrait phones, less than 576px)
@media (max-width: 575px) {
  .parallax {
    height: 50%;
  }
 }

// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) and (max-width: 767px) {
  .parallax{
    height: 70%;
 }

// Medium devices (tablets, 768px and up)
@media (min-width: 768px) and (max-width: 991px) {
  .parallax{
    height: 64%; }

// Large devices (desktops, 992px and up)
@media (min-width: 992px) and (max-width: 1199px) {
.parallax{
    height: 75%; }

// Extra large devices (large desktops, 1200px and up)
@media (min-width: 1200px) {
  .parallax{
    height: 90%; }

https://jsfiddle.net/srcdbyrm/

korzo
@korzo
Sep 24 2017 16:29
@ldocherty1 // is not valid CSS comment
your media queries are not closed (missing })
Liam Docherty
@ldocherty1
Sep 24 2017 16:50
@korzo I took out the comments. Can you show me with an example of the }} please?
korzo
@korzo
Sep 24 2017 16:51
@ldocherty1 Format for media queries is
@media (min-width: 992px) and (max-width: 1199px) {

}
Liam Docherty
@ldocherty1
Sep 24 2017 16:56
@korzo Thanks it's working now :)
CamperBot
@camperbot
Sep 24 2017 16:56
ldocherty1 sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 541 | @korzo |http://www.freecodecamp.com/korzo
santhoshbalaguru001
@santhoshbalaguru001
Sep 24 2017 17:46
https://codepen.io/santh/pen/qPbBjQ I added image on page four in css its not showing correctly
pls help me out
Albert Cardona II
@daddycardona
Sep 24 2017 18:28
for all them people that helped me thanks so much I figured out the html entities so thanks @korzo and @thekholm80 you 2 open my eyes to how slow I am sometimes but helped me out a lot :) I even used your specialChars with a loop vs what you did @thekholm80 and used regex ;)
CamperBot
@camperbot
Sep 24 2017 18:28
daddycardona sends brownie points to @korzo and @thekholm80 :sparkles: :thumbsup: :sparkles:
:cookie: 542 | @korzo |http://www.freecodecamp.com/korzo
:star2: 1481 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Amit Patel
@AmitP88
Sep 24 2017 18:34
hey guys, I'm trying to modify & implement some code off of this tutorial site (https://code.tutsplus.com/tutorials/create-an-html5-canvas-tile-swapping-puzzle--active-10747) for my 3 match game for the tile swap functionality. All was going well until I tried to implement the onPuzzleClick() function, where I'm running into issues with the drawImage method within the function (error says that the input is of incorrect type, basically that the input type is not an image). I've tried to fix this several ways but nothings panned out so far. Please help me understand how to fix this :grinning:
Here's my code: https://codepen.io/AmitP88/pen/pWyaNY?editors=0010
korzo
@korzo
Sep 24 2017 18:35
@daddycardona Good job :+1:
StrategyIsKey23
@23beyblade
Sep 24 2017 18:38
anyone know whats wrong with my code?
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  h2 {
    font-family: Lobster, Monospace;
  }

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

</style>

<div class="container-fluid">
  <div class="row">
    <div class="col-xs-8">
      <h2 class="text-primary text-center">CatPhotoApp</h2>
    </div>
    <div class="col-xs-4">
      <a href="#"><img class="img-responsive thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. "></a>
    </div>
  </div>
  <img src="https://bit.ly/fcc-running-cats" class="img-responsive" alt="Three kittens running towards the camera. ">
  <div class="row">
    <div class="col-xs-4">
      <button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
    </div>
    <div class="col-xs-4">
      <button class="btn btn-block btn-info"><i class="fa fa-info-circle"></i> Info</button>
    </div>
    <div class="col-xs-4">
      <button class="btn btn-block btn-danger"><i class="fa fa-trash"></i> Delete</button>
    </div>
  </div>
  <p>Things cats <span class="text-danger">love:</span></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">
    <div class="row">
      <div class="col-xs-6">
        <label><input type="radio" name="indoor-outdoor"> Indoor</label>
      </div>
      <div class="col-xs-6">
        <label><input type="radio" name="indoor-outdoor"> Outdoor</label>
      </div>
    </div>
    <div class="row">
      <div class="col-xs-4">
    <label><input type="checkbox" name="personality"> Loving</label>
      </div>
      <div clas="col-xs-4">
    <label><input type="checkbox" name="personality"> Lazy</label>
      </div>
      <div class="col-xs-4">
    <label><input type="checkbox" name="personality"> Crazy</label>
      </div>
    </div>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</div>
Amit Patel
@AmitP88
Sep 24 2017 18:39
@23beyblade can you put it in a codepen please?
StrategyIsKey23
@23beyblade
Sep 24 2017 18:40
ill try, not sure how, its been a hile
while*
korzo
@korzo
Sep 24 2017 18:41
@23beyblade Which test fails?
Amit Patel
@AmitP88
Sep 24 2017 18:41
@23beyblade if you have a GitHub or Google account you should be able to login np
StrategyIsKey23
@23beyblade
Sep 24 2017 18:44
ok im tyring to
um
put the
check boxes in rows
like useing col-md-*
Albert Cardona II
@daddycardona
Sep 24 2017 19:07
you are not using the boostrap link for col-xs-8
@23beyblade
StrategyIsKey23
@23beyblade
Sep 24 2017 19:08
ok thanks @daddycardona
CamperBot
@camperbot
Sep 24 2017 19:08
23beyblade sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 347 | @daddycardona |http://www.freecodecamp.com/daddycardona
StrategyIsKey23
@23beyblade
Sep 24 2017 19:08
and thanks @AmitP88
Amit Patel
@AmitP88
Sep 24 2017 19:08
@23beyblade np :)
StrategyIsKey23
@23beyblade
Sep 24 2017 19:08
sorry i dont know if it sent points
Amit Patel
@AmitP88
Sep 24 2017 19:09
@23beyblade no worries :)
Albert Cardona II
@daddycardona
Sep 24 2017 19:09
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
Amit Patel
@AmitP88
Sep 24 2017 19:09
hey guys, I'm trying to modify & implement some code off of this tutorial site (https://code.tutsplus.com/tutorials/create-an-html5-canvas-tile-swapping-puzzle--active-10747) for my 3 match game for the tile swap functionality. All was going well until I tried to implement the onPuzzleClick() function, where I'm running into issues with the drawImage method within the function (error says that the input is of incorrect type, basically that the input type is not an image). I've tried to fix this several ways but nothings panned out so far. Please help me understand how to fix this :grinning:
Here's my code: https://codepen.io/AmitP88/pen/pWyaNY?editors=0010
Albert Cardona II
@daddycardona
Sep 24 2017 19:09
I always use these but I am going to try to start using bootstrap 4 since its up now
StrategyIsKey23
@23beyblade
Sep 24 2017 19:10
ok ty
Kyle Holm
@thekholm80
Sep 24 2017 20:54
@daddycardona I'm glad you figured it out
winning feels good
DaX
@daxdax89
Sep 24 2017 21:36
any expert here looking to earn quick 5$ to help me fix error?
Tiago Correia
@tiagocorreiaalmeida
Sep 24 2017 21:43
this is not a service support chat as far as I know beside that
show us the issue you have andif we can help it will be for no cust
DaX
@daxdax89
Sep 24 2017 21:46
This website http://wefunds.nyc/
it opens menu on mobile device
but it doesnt close it
how do i fix it?
done it in bootstrap
Tiago Correia
@tiagocorreiaalmeida
Sep 24 2017 21:48
dont know if you used toggle
but that's a way
DaX
@daxdax89
Sep 24 2017 21:49
i did as you can see in code, but for some reason it doesn’t work
Tiago Correia
@tiagocorreiaalmeida
Sep 24 2017 21:52
confusing sure isnt anything overwritting what you did?
@daxdax89 collapse and in are 2 different classes?
@daxdax89
DaX
@daxdax89
Sep 24 2017 21:58
yeah those are two different ones
Tiago Correia
@tiagocorreiaalmeida
Sep 24 2017 21:59
I made it with one way
maybe not the best xd
and will make a simple solution into 5 lines of code
so there must be something wrong here
you writed the code for the click on the button or you used something like bs?
if you writted it can you show me?
DaX
@daxdax89
Sep 24 2017 22:14
@tiagocorreiaalmeida you wrote it and it worked for you ?
Eric Miller
@ericmiller777
Sep 24 2017 22:35
hey guys
so i made this for my simon game using javascript/jquery
how could i still get that div in the center like that with css?
and keep it responsive
also @DarrenfJ thanks, but its really the same, as a buttons in a div, just I like the way the buttons look
CamperBot
@camperbot
Sep 24 2017 22:37
ericmiller777 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2049 | @darrenfj |http://www.freecodecamp.com/darrenfj
Gersho
@Gersho
Sep 24 2017 22:49
Hello everyone
Nahuel Ovejero
@NahuelOvejero
Sep 24 2017 22:55
:wave:
Eric Miller
@ericmiller777
Sep 24 2017 23:07
@Gersho hello
i got that div in the center
using javascript
cant figure out how to do it with css
links updateing btw
Gersho
@Gersho
Sep 24 2017 23:10
is it updated now ?
Eric Miller
@ericmiller777
Sep 24 2017 23:12
yea
but ive noticed my resize doesnt position it correctly if the screen height is different
like mobile it only works in landscape
Gersho
@Gersho
Sep 24 2017 23:14
on my screen, it's a bit too much down, and even more down if i reduce width (with same height)
Eric Miller
@ericmiller777
Sep 24 2017 23:15
yes
any idea how to do the same thing with css\
Gersho
@Gersho
Sep 24 2017 23:16
how did you do it for the buttons ? the same methode doesn't work ?
Eric Miller
@ericmiller777
Sep 24 2017 23:17
i pretty much gave up yesterday, erased a loty today, and it just worked lol
i need the
middle div to go over the
buttons
so i know
i can use z position for that
lets see
Gersho
@Gersho
Sep 24 2017 23:18
isn't z index the one for superposition ?
the best i think would be to have the position of the menu dependant on the position of the simon
Eric Miller
@ericmiller777
Sep 24 2017 23:19
idk i used it for a nav bar once and it kept it at the top of the page
on top of everything
how do i make that not happen
how do i make a dif that doesnt change my other divs
x-index btw
z-index
Gersho
@Gersho
Sep 24 2017 23:23
lol
you know what
Eric Miller
@ericmiller777
Sep 24 2017 23:23
hmm?
Gersho
@Gersho
Sep 24 2017 23:23
that's what happened when i had tried to do it in columns
Eric Miller
@ericmiller777
Sep 24 2017 23:23
i suck?
Gersho
@Gersho
Sep 24 2017 23:24
told you i had given up on it and ended up doing it in fixed
because i couldn't fix that xD
Eric Miller
@ericmiller777
Sep 24 2017 23:24
i see
Gersho
@Gersho
Sep 24 2017 23:24
there's surely a solution
but i don't know it
Eric Miller
@ericmiller777
Sep 24 2017 23:26
well i got it a little better
Gersho
@Gersho
Sep 24 2017 23:27
looks like it, would it work if you changed it's margins padding and stuff to make it "move" ?
using relative values it might survive size change
work for you?
Gersho
@Gersho
Sep 24 2017 23:32
yep, even on rescaling (the whole thing become smaller if width is reduced)
Eric Miller
@ericmiller777
Sep 24 2017 23:32
@Gersho thanks
CamperBot
@camperbot
Sep 24 2017 23:32
ericmiller777 sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 454 | @gersho |http://www.freecodecamp.com/gersho
Eric Miller
@ericmiller777
Sep 24 2017 23:32
now for the hard part
Gersho
@Gersho
Sep 24 2017 23:32
we can see the squares of each button when we click
Eric Miller
@ericmiller777
Sep 24 2017 23:33
yea
i think theres a easy way to fix that
im gonna take a break
Gersho
@Gersho
Sep 24 2017 23:34
yeah walk away from the css when you can xD