Git Product home page Git Product logo

forms.css's Introduction

Forms.css

General cross browser styles for forms and buttons. This is a base and does not provide much in the terms of branding. This is meant to be a starting point for all forms and buttons to allow for consisitant structural styling accross all browsers.

Styles tested in: IE7+, Firefox 8, Safari 5, and Chrome 15.

###Basic HTML Basic HTML structure borrowed from Twitter Bootstrap

<form>
    <div class="spot">
        <label for="input">Label</label>
        <div class="input">
            <input type="text" id="input"/>
        </div>
    </div>
</form>

###Buttons .button can be applied to either button or anchor elements.

<button class="button">Button</button>
<a href="#" class="button">Anchor Button</a>

A few basic button styles are provided.

  • .button: this is the basis for all buttons, and can be used for general button styling
  • .primary: primary call to action
  • .negative: negative call to action (e.g. delete)
  • .link: hyperlink type button with no background or border
  • .full-width: 100% width button, good for mobile

###Validation/Error states

  • .error-spot: Containing div class, allows styling of label and form input
  • .error: Error message class
<div class="spot error-spot">
    <label for="input">Label</label>
    <div class="input">
        <input type="text" id="input"/>
    </div>
    <div class="error">Error Message!</div>
</div>

Bitdeli Badge

forms.css's People

Contributors

bitdeli-chef avatar

Stargazers

Cameron Wardzala avatar

Watchers

Cameron Wardzala avatar 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.