Skip to content

Instantly share code, notes, and snippets.

@rhatano
Created April 7, 2012 23:18
Show Gist options
  • Save rhatano/2332773 to your computer and use it in GitHub Desktop.
Save rhatano/2332773 to your computer and use it in GitHub Desktop.
The display property
Using the property 'display' there are two values that can be associated with it.
The first property is inline, the elements affected by it are displayed inline follow the flow of a line.
The second property is block, which separated the elements affected by it by a line break.
This is useful to override the way that HTML displays itself by default; for example, look at the <h1> tag.
Every instance of the h1 tag, or any header tag, is immediately followed by a line break.
However if I used the following CSS:
h1 {
display:inline;
}
My heading will be in line with any other text I may have.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment