Skip to content

Instantly share code, notes, and snippets.

@daihuaye
Last active August 29, 2015 14:07
Show Gist options
  • Save daihuaye/6d9416ced0b5ab4391ce to your computer and use it in GitHub Desktop.
Save daihuaye/6d9416ced0b5ab4391ce to your computer and use it in GitHub Desktop.
Some tips in CSS
.element {
/*apply: display: inline-block;*/
float: left;
}
.element {
/*apply: width: inherit; height: inherit;*/
display: inline;
}
.element {
/*apply: height: 100px; vertical-align: middle;*/
line-height: 100px;
}
.element1, .element2 {
/*apply: float: left; top: 0;*/
display: inline-block;
vertical-align: top;
}
/*Select and style every <p> element that is the first child of its parent:*/
p:first-child {
background-color: yellow;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment