Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 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
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Henry
@GitHub-Henry
@MelEKn
def
@defregga
Thanks @GitHub-Henry
CamperBot
@camperbot
defregga sends brownie points to @github-henry :sparkles: :thumbsup: :sparkles:
:cookie: 278 | @github-henry |http://www.freecodecamp.com/github-henry
Henry
@GitHub-Henry
@MelEKn pen settings behavior, auto save, auto preview settings
Melissa Knapp
@MelEKn
@GitHub-Henry Why do I need to auto preview? I've just been clicking save and then run.
Henry
@GitHub-Henry
@MelEKn i was meaning those are the settings that set the behavior of the pen
Melissa Knapp
@MelEKn
@GitHub-Henry OK, so what do I do to for what I write in the CSS section to work like it does in the HTML section with <style> </style> around it?
@GitHub-Henry Wow that was garbled. What do I need to to for what I write... etc
Henry
@GitHub-Henry
@MelEKn you want css in your html?
@MelEKn trying to understand
Melissa Knapp
@MelEKn
@GitHub-Henry Right now if I write something in the CSS section, it doesn't do anything, but if I copy/paste it into the HTML section and put <style> and </style> on either side of it, it works. I would like to be able to just write it in the CSS section.
Henry
@GitHub-Henry
@MelEKn if the auto preview is enabled it should show your css as soon as it gets saved in the css box
Melissa Knapp
@MelEKn

@GitHub-Henry So for example, if I write in the CSS section of CodePen:

body{
color: white;
background-color: black;
}

It doesn't do it, the background and text color are still default. But if I go to the HTML section and write

<style>
body{
color: white;
background-color: black;
}
</style>

then it works, and the background is black and the text is white.

I don't need auto preview, I'm clicking run and that's worked fine for everything else.

I assume there's some sort of tag or something I'm supposed to be adding that I'm not, but I have no idea what it is, so I was hoping someone here would know?
Henry
@GitHub-Henry
post pen
@MelEKn
h1tag
@h1tag
@MelEKn the Bootstrap css file link goes in the CSS settings
Melissa Knapp
@MelEKn
@fortMaximus I did that too, but when it didn't work I decided to do both just in case :{
*:P
If you go to the settings for CSS, you'll see that Bootstrap is added
the version that is added is setting is v4-alpha
Henry
@GitHub-Henry
Melissa Knapp
@MelEKn
@fortMaximus OK, I changed it to that one in settings, but it's still not working
@GitHub-Henry Yes? Did you mean to send another link to my pen?
h1tag
@h1tag
@MelEKn also you don't need the body tags in html on Codepen
and remove the style tags too
Melissa Knapp
@MelEKn
@fortMaximus OK, I only added them because I thought that might be why the CSS wasn't working. What do I label the styles I want for the entire page then?
Henry
@GitHub-Henry
@MelEKn here's what i think, you need and ID to give your element priority over BS
Melissa Knapp
@MelEKn
@fortMaximus But the style tags are the only way I can style the page at all. I didn't have them originally and the CSS still didn't work, that's the whole reason I added them, so that can't be the problem.
@GitHub-Henry OK, what does that mean and how would I do it?
Henry
@GitHub-Henry
When using BS they have priority with a bunch of classes, to have a higher priority use IDs then select those IDs, it will give your CSS a higher priority and make the changes you want.
Melissa Knapp
@MelEKn
@fortMaximus But OK, I'll take the style tags out
Henry
@GitHub-Henry
Simply put, use IDs in your HTML, then use CSS selector to target those IDs
BS= Bootstrap
@MelEKn I've run into this as an issue with BS
Melissa Knapp
@MelEKn
@fortMaximus Oh wow, it does work now!
@fortMaximus That's so bizarre, it didn't work before when I'd set it up exactly like this. Weird!
@fortMaximus Thanks :)
CamperBot
@camperbot
melekn sends brownie points to @fortmaximus :sparkles: :thumbsup: :sparkles:
:cookie: 703 | @fortmaximus |http://www.freecodecamp.com/fortmaximus
Henry
@GitHub-Henry
@MelEKn So what was the issue?
Melissa Knapp
@MelEKn
@GitHub-Henry Absolutely no idea
@GitHub-Henry I even changed the Bootstrap version back to the one CodePen adds when you click the button to see if that was the issue-- nope
Henry
@GitHub-Henry
@MelEKn well i know it worked with the IDs
@MelEKn Does it just work now?
h1tag
@h1tag
@MelEKn maybe the body tags were creating conflict
Melissa Knapp
@MelEKn
@fortMaximus But I only added those after the CSS didn't work :-/