Created
April 7, 2012 23:18
-
-
Save rhatano/2332773 to your computer and use it in GitHub Desktop.
The display property
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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