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
CamperBot
@camperbot
dadleatherwood sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 736 | @alpox |http://www.freecodecamp.com/alpox
alpox
@alpox
@dadleatherwood Its not, lot of people run into this :-)
Jacob Leatherwood
@dadleatherwood
@dadleatherwood Can you explain what position:relative did, and transform: translateY(-50%)?
alpox
@alpox
@dadleatherwood position: relative; goes sure that the element can be aligned relatively to its parent element through the top, bottom, left and right attributes, which would be ignored by the default positioning position: static;.
Jacob Leatherwood
@dadleatherwood
@alpox Thank you!
CamperBot
@camperbot
dadleatherwood sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:warning: dadleatherwood already gave alpox points
alpox
@alpox
So you can set top: 50%; which moves the elements upper most border/point to the middle (50%)
Since it was the upper most point which was used to align the element, the element would be too much down (As much as half the element)
Jacob Leatherwood
@dadleatherwood
@alpox Can you help with something else?
alpox
@alpox
So you use transform: translateY(-50%); Which moves the element up for half its own size
@dadleatherwood Guess i can
Patirck
@SomeRandom42
Hey? could someone help me? I am trying to do the Build a Random Quote Machine, but Looking at the JSON lessons. I am at a total loss on what to do . I tried re doing the lessons but understood none of it and just copied the input and did the lesson. But I did not learn anything.
Jacob Leatherwood
@dadleatherwood
@alpox I have my icons in the footer. How can I get them to the right of the page instead of below the 'About the Page' h1? I put them in seperate columns, but that did not do what I wanted.
alpox
@alpox
@SomeRandom42 Do you wanna use an API or not? It would maybe be easier without one for the beginning. So you can go with just a bit local javascript
Patirck
@SomeRandom42
@alpox I do not plan 2. My initial thought is to make an array with several quotes and use locl javascript. I am at a loss on how to use it here and would like ideas what to look uo\p
alpox
@alpox
@dadleatherwood Do you want the text to be totally right aligned or rather left aligned but on the right side?
@SomeRandom42 Yea thats the better way for the beginning i would say. Did you do the exercises about javascript objects?
Jacob Leatherwood
@dadleatherwood
@alpox Lets do right aligned to the far right of the page
alpox
@alpox
If you did them but not understand them, try to redo and try to understand what happens there. If you don't, just come here and ask (Maybe better in the HelpJavascript channel)
Patirck
@SomeRandom42
@alpox I did but I might need to go back and refresh (moved so I have not been coding for a month so I am hazy
alpox
@alpox
@dadleatherwood When you want the title to stay, put the rest of the footer into a new div which you can give an id to (or a class if you prefer)
@SomeRandom42 Well the outline is that you can have an object:
var obj = {
    someKey: "somevalue"
};

console.log(obj.someKey); // Logs somevalue
Jacob Leatherwood
@dadleatherwood
@alpox Aren't the icons/links already in their own <div class="col-md-6">?
alpox
@alpox
If the key begins with a number or contains whitespace you have to define and access it bit different:
var obj = {
    "51key": "somevalue",
    "key with whitespace": "test"
};
console.log(obj["51key"]); // Logs somevalue
console.log(obj["key with whitespace"]); // Logs test
@dadleatherwood These yes, but not the Made by
Or did you want that one to stay there?
Patirck
@SomeRandom42
@alpox you know I think my issue is I have no idea how javascript interacts with html / css. I think I have idea of how to write the array (from the exercises) but being thrown into the wild . I am not sure how to make the java script work. in my knowledge the java script bod is just sitting in code pen
Jacob Leatherwood
@dadleatherwood
@alpox That one will stay with the About Page title.
@alpox I just want to get the icons to the right of the page.
alpox
@alpox
@SomeRandom42 The interactions happen through simple function calls. You probably want to use jQuery for this kind of interaction since its presented by freecodecamp
For access special objects on the page you use the html class or id of an element
If you want to access an object with the id "test": $("#test") represents this html object
if you want to access all objects with the class "active": $(".active") represents all these html objects
If you want to set the text of an element: $("#test").text("You put some new text in this element here");
This would set the text "You put some new text in this element here" inside the element with the id test
@dadleatherwood Ah alright. you probably want to set another class to that div then though (additionally) since col-md-6 is not very specific and gets reused since its declared by bootstrap
Patirck
@SomeRandom42
@alpox I am kind of getting it but do you know a good source with examples? I can play around with it to wrap my mind around it , but hard to do with moving chat bar
alpox
@alpox
@dadleatherwood Then you can set it position: relative too and right: 0;
@SomeRandom42 Well you can always play in codepen
@SomeRandom42 Just create html there, maybe just a div in the html panel
Then some simple javascript for testing this

@SomeRandom42

<div id="test">
</div>

In the html panel

$("#test").text("You put some new text in this element here"); in the javascript panel

Go sure to add jquery in the javascript panel in settings (top right of page)
blob
Patirck
@SomeRandom42
@alpox Thanks I will play around with this for a little but and come back thank you :! so much!
CamperBot
@camperbot
somerandom42 sends brownie points to @alpox :sparkles: :thumbsup: :sparkles:
:cookie: 737 | @alpox |http://www.freecodecamp.com/alpox
Jacob Leatherwood
@dadleatherwood
@alpox Okay, will you take a look?