Coder Dojo <Nano> Build your own Website Book. Trouble with Code.



  • On page 28 of the Book. I have Encountered a issue with the following Code.
    body {
    background-color: Thistle;
    border: 2px Solid Gray;
    border-radius: 16px;
    font-family: sans-serif;
    margin-left: auto;
    margin-right: auto;
    padding-top: 8px;
    padding-bottom: 24px;
    padding-left: 24px;
    padding right: 24px:
    }
    html {
    backround: radial-
    gradient(circle, SkyBlue,
    SkyBlue 50%, LightCyan 50%,
    SkyBlue);
    backround-size: 8px 8px;
    }

    Specifically with the

    html {
    backround: radial-
    gradient(circle, SkyBlue,
    SkyBlue 50%, LightCyan 50%,
    SkyBlue);
    backround-size: 8px 8px;
    }
    code. It does not simply put the border around the page. Everything else is fine and correct.
    So if I simply messed up the code, I’m asking if someone will lend me their working one.
    Finally, if somebody needs more info on the matter. just simply tell me, and i’ll reply
    the best I can. Great Book BTW if the Devs see this


  • CoderDojo Foundation

    Hi @isaac, there are just a few small issues in your code that you need to fix. You’re pretty close to right.

    You need to change the following:

    • padding right: 24px: should be padding-right: 24px; (note the hyphen where you have a space and the semicolon where you have a colon)
    • backround needs to be background everywhere
    • You’ve split radial-gradient on two different lines. I know that’s what it looks like in the book, but that’s the text wrapping rather than an explicit carriage return. You need to have that on the same line, as the line break is splitting the property name, meaning the browser doesn’t understand it.

    I was able to find all of these pretty quickly because I used a code highlighting editor that pointed them out to me. I guess you’re using Notepad, or some other editor that doesn’t highlight? I’d recommend getting VS Code or Atom and using that instead, as it’ll help you pick up typos and other small errors like this. You’re still on your own to figure out the bigger ones, though you can always come back here!



  • Thank you so much Philip. You were right about everything. I was using Note pad and I am
    now likely to get one of those checkers. I think Atom was it? But anyway I really appreciate it.
    This was not supposed to be a all hard problem at all. Smile Face Emoji


  • CoderDojo Foundation

    You’re welcome @isaac! Have you been using the book at your Dojo, or did you come across it some other way?

    Also, the editors are more than just checkers for code. They’ll do things like highlight your HTML tags, automatically complete parts of the code for you, etc. They generally make the whole business a lot easier!



  • Actually Phillip, I don’t have a “Dojo” in my area. And I actually got the book at the Book-Fair
    at my High School. I love it and I’ve been stuck to my laptop ever since. (ever since yesterday)


Log in to reply
 

Looks like your connection to CoderDojo Forum was lost, please wait while we try to reconnect.