Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 2020 20:09
    @krisb1220 banned @Gastony
  • May 14 2020 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 2020 22:38
    @bjorno43 banned @real-action
  • Feb 01 2020 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 2020 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 2019 17:13
    @mstellaluna banned @cmal
  • Jan 08 2019 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
zdman135
@zdman135
If you’re talking about, why when you reduce the screen size the links that are horizontal and to the left and next to the logo, and why, the links move to the right, and are stacked vertically. you have to look at the box that is holding both the logo and the links. and when we look at that box we see the following css:
in the .navbar class there’s display:flex so they’re using flexbox and justify-content: space-between. so basically in this case there are 2 boxes within the big navbar (class) box holding it and it will push the 2 logo and links boxes as far apart as possible within the navbar box holding it. I hope that helps explain it.
this is where getting good at using the dev-tools in your browser really helps. cause you can see what is going on. what css classes and attributes are being applied, and how big a box is.
and what’s inside the box and what’s it doing
you can also edit on the fly in the dev-tools before you add it in your code. to kinda try it out and play around.
zdman135
@zdman135
@bradley1492 - I took the example you gave, and modified the bootstrap css classes to match what you wanted. here is the example: https://www.w3schools.com/code/tryit.asp?filename=FXO8RVFV2LV1
you can see the 2 styles I added will prevent the links from going to the right and stacking vertically.
You will still need to add padding between the links. as they are all bunched up.
Christopher
@bradley1492

@zdman135 wow thanks.
This really helps me a lot to basically understand what's going on in a bootstrap navbar.

Now I am understanding quite a bit more, where to start looking to understand the basic behaviour of a navbar created with bootstrap.

Basically I wanted to try out creating a layout similar to this one:
https://codepen.io/bradley1492/pen/mQKmyB?editors=0100

zdman135
@zdman135
@bradley1492 - i’m still learning just like you. one thing that helped me is I built a very basic portfolio 3 times. once with pure html / css. then a 2nd one same as first one but I added media queries to teach me responsive design and override certain css attributes. and 3rd portfolio, i used bootstrap and try to make it exactly the same as the first one but with bootstrap, and override css classes and or attributes as necessary to make it the same.
I can DM you my private portfolio as an example to see
Christopher
@bradley1492
@zdman135 yes sure I'd like to have a look. I am building a page for my dad and that's sort of similar to what you did. I just experiment quite a lot, with native html/css responsive design and bootstrap to see what designs and ideas appeal to me, as I did more js in the past and less css..
zdman135
@zdman135
@bradley1492 - i sent a private message to you with that info
keep in mind i’m still newbie as well. so we are both just helping each other improve.
Shekhar Ramola
@shekharramola
trying to open an array which is having 23 element but it shows only one in the console?
image.png
Brad
@bradtaniguchi
My guess is when it prints it has 23 items, but then you change it later to one via reference. When your printing do console.log(JSON.stringify(youArr, null, 2))to print it out to a string before you change it.
Christopher McCormack
@cmccormack
I think what you are experiencing is a log of an object that is then changed by the time you review it - browsers may display a reference to the actual object, meaning if you change it then look in the console you'll open it and see the updated object not the object at the point you logged it
Brandon Spaulding
@brock8282
hello - can anyone help me find a solution for a google maps question - ? i am trying to see how i can have a user enter their address and see if they are in a service area of a map, if so then i need to redirect them to the page that correllates to which part of the map their address is in
Mantas2
@Mantas2
Hello everybody, I have a problem with my freecodecamp technical documentation page. I tried doing it using CSS Grid, and I want the navbar to be at the top of the page, the main-content below it, all in a single column when using media query, but I fail to do it. I think the problem is that position: fixed; in the #navbar disables the grid layout. Sorry if the question is stupid, but I would be very thankful for any help. https://codepen.io/mantas2/pen/JeLWxW
TCzechowski
@TCzechowski

Hey guys! I've got a problem.
I've created a simple function that reads the price of an item and adds it to the "total price" section. The problem is that it reads the price of only one item. How can I modify it so it will read the price of all of the items (when the button has been clicked it reads the price of nearby div, not the first one).

Here is the example: https://codepen.io/tomaff/pen/oQQego

I want it to add 9.90 when clicked inside the div with 9.90, 15.30 when clicked inside the div with 15.30 and so on.

Mohammed Boudad
@matrixersp
@TCzechowski This is the way I would do it https://codepen.io/matrixersp/pen/bQQMOd?editors=1010
Mark Kubik
@KUBIX90
Hi all
let data = {
    breakLength: 0,
    sessionLength: 0,
    sessionTimer: 0,
    incrementTimer: () => {
        console.log(data.sessionTimer = data.sessionTimer + 1);
        data.sessionTimer >= 60 ? data.sessionTimer = 0 : data.sessionTimer;
    },
    activateTimer: () => {
        let startTimer = setInterval(data.incrementTimer, 1000);
        startTimer;
    },
    resetTimer: () => {
        clearInterval(data.activateTimer);
        data.sessionTimer = 0;
    }
};

document.querySelector('.start').addEventListener('click', function (e) {
    data.activateTimer();
})

document.querySelector('.stop').addEventListener('click', function () {
    clearInterval(data.activateTimer);
})

document.querySelector('.reset').addEventListener('click', function () {
    data.resetTimer();
})
I cannot get the timer to stop on click, the clear interval is not working can anyone help me as to why? I put the set interval into a variable but it still does not work.
It's not throwing up any errors which is making it more awkward to debug
Mohammed Boudad
@matrixersp
@KUBIX90 You simply have to save the timer id then use it to clear the timer. This should work
let data = {
    breakLength: 0,
    sessionLength: 0,
    sessionTimer: 0,
    timerId: null, // declare the timer id here
    incrementTimer: () => {
        console.log(data.sessionTimer = data.sessionTimer + 1);
        data.sessionTimer >= 60 ? data.sessionTimer = 0 : data.sessionTimer;
    },
    activateTimer: () => {
        data.timerId = setInterval(data.incrementTimer, 1000); // save the timer id
    },
    resetTimer: () => {
        clearInterval(data.activateTimer);
        data.sessionTimer = 0;
    }
};

document.querySelector('.start').addEventListener('click', function (e) {
    data.activateTimer();
})

document.querySelector('.stop').addEventListener('click', function () {
    clearInterval(data.timerId);  // clear interval using timer id
})

document.querySelector('.reset').addEventListener('click', function () {
    data.resetTimer();
})
Bashir Harrell
@bookofbash
Hi all
Can someone help with an issue in building a landing page?
I made the top half of my page using css grid, and the rest more or less with flex-box. But now I want the header which is part of the grid to stay sticky throughout the whole page
so far I have mad it 'position: sticky' 'top:0'
that helped, but it only makes it sticky in the grid section
here is a codepen:
Bashir Harrell
@bookofbash
Solved!
Mark Kubik
@KUBIX90
@matrixersp Thanks, this works great
Mohammed Boudad
@matrixersp
@KUBIX90 any time
Mandeep Sharma
@mandeephub
Hello to all
Ghost
@ghost~5a7ec891d73408ce4f8c87b2
hello
Mandeep Sharma
@mandeephub
If any one has free admin template pls provide me i m willing to start with a project and i want use that in that poject
Thanks
Mandeep Sharma
@mandeephub
@bookofbash nice work
Anton
@yozhikvtumane
Aditya
@ezioda004
@yozhikvtumane The tests have a time limit - you need to make your algorithm more efficient in order to pass the challenge.
Anton
@yozhikvtumane
I have no idea how to make it faster
Aditya
@ezioda004
@yozhikvtumane You're checking from the smallest number, you can do the opposite and start checking multiple of the largest number in the range.
Anton
@yozhikvtumane
wow man, how did you understand anything in my shitty code? =D
Aditya
@ezioda004
Because I used to write shittier code :D
Anton
@yozhikvtumane

@ezioda004

checking multiple of the largest number in the range.

You mean that instead of increasing t I should use something like the last one element in array of all numbers multiplied by itself?

Aditya
@ezioda004
@yozhikvtumane I mean you can reverse this loop, say the range is [13, 23]so start checking multiples of 23 with 22, 21 upto 13. If multiple of 23 isnt a multiple of say 21 then break the loop, get the next multiple and repeat the process.
Anton
@yozhikvtumane
Yeah, I did this, but still can't pass the tests @ezioda004
Has to do something with incrementing the value of multiple
Mark Kubik
@KUBIX90
Hi IM having a problem with converting a single digit value to a two digit for this digital timer im creating