Giter VIP home page Giter VIP logo

01-button-sprint's Introduction

Background & Objectives

Work on three different button designs (two given by us, one of your choice). Here is your objective. We have already put the HTML code in index.html

<a href="#" class="btn-medium">Write a story</a>
<a href="#" class="btn-treehouse">Start now</a>
<a href="#" class="btn-yours">Your call</a>

Your job is now to write the associated CSS in button.css.

Don't forget to hard refresh your browser (cmd + shift + r) to clear your browser's cache if your page doesn't seem to display your current code!

Organize your CSS with component files

From this point, you will start organizing your CSS code with one CSS file for each component. A button is a standard component, such as an avatar, a card, a list, a navbar, a tab, a form, etc. Each of these components deserve their own CSS file. Your project architecture will look like:

.
├── css
│   ├── components
│   │   ├── avatar.css
│   │   ├── banner.css
│   │   └── button.css
│   └── style.css
└── index.html

Then in style.css:

/* Importing all components file */
@import url("components/avatar.css");
@import url("components/banner.css");
@import url("components/button.css");

/* General style rules for fonts and colors */
body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
}
h1, h2, h3 {
  font-family: Raleway, Helvetica, sans-serif;
}

Then you just need one unique link to style.css in your HTML file:

<head>
  <link rel="stylesheet" href="css/style.css">
</head>

Don't forget the hover

Don't forget to design the .btn:hover state for each of your buttons.

Spacing around a link

You might have noticed that margin does not apply on your links by default. This is because the <a> tag is an inline element. If you want apply spacing to links you will need to change their display property to inline-block or block.

01-button-sprint's People

Contributors

anjalaube3000 avatar

Watchers

James Cloos avatar  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.