Skip to content

Instantly share code, notes, and snippets.

@eirikbakke
Created July 1, 2011 19:49
Show Gist options
  • Select an option

  • Save eirikbakke/1059266 to your computer and use it in GitHub Desktop.

Select an option

Save eirikbakke/1059266 to your computer and use it in GitHub Desktop.
Example CSS file
/* Applies to the entire body of the HTML document (except where overridden by more specific
selectors). */
body {
margin: 25px;
background-color: rgb(240,240,240);
font-family: arial, sans-serif;
font-size: 14px;
}
/* Applies to all <h1>...</h1> elements. */
h1 {
font-size: 35px;
font-weight: normal;
margin-top: 5px;
}
/* Applies to all elements with <... class="someclass"> specified. */
.someclass { color: red; }
/* Applies to the element with <... id="someid"> specified. */
#someid { color: green; }
/* Applies to the <div id="imageExample"> element from the example in the HTML section. */
div#imageExample { float: right; }
@AddisBelayhu

Copy link
Copy Markdown

// managing an image
img {
width: 400px;
height: 300px;
display: flex;
}

@magicrani-35

Copy link
Copy Markdown

Thank you for this.. attempting to create my first stylesheet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment