Giter Site home page Giter Site logo

olinjs-4's Introduction

olinjs-4

lecture #4: style and grace

Notes from the last homework

Recapping what we've done

recap

CSS

CSS is what makes websites look pretty. It's the difference between this:

style

and this:

no_style

For these two websites the html is the same, the Javascript running on the browser is the same, everything which went on on the server side to render this page is the same. The only difference is that one is completely lacking css styling.

So far we've been making webpages without styling, so they look alot like ugly twitter shown above. Now we're gonna start learning how to pretty them up. Take the site which you made for HW3.

hw3 not style

Lets add some style to it!

So open up the new_ingredient.html file in this repo, and we'll just change some css attibrutes, for a few elements. To do this we'll use the chrome inspector.

  1. font-size: 32px
  2. text-align: center
  3. font-family: Lucida Sans Unicode, Lucida Grande, sans-serif
  4. border: 4px solid black
  5. border-radius: 10px
  6. border: 2px solid green
  7. border: 2px solid red
  8. border: none
  9. padding-bottom: 12px
  10. background-image: url(http://maxim061156.files.wordpress.com/2012/09/santaclaus15.jpg)

And voila! look at our beatiful website!

So this is all great and all, but refresh the page, and what happens? All of our hard work is gone. So how do we make permanent css styles? Using a stylesheet. Fork this repo, pull it, the open up a text editor and lets make one.

olinjs-4's People

Contributors

runnedrun avatar tcr avatar

Watchers

Derek Redfern avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.