Skip to content

Instantly share code, notes, and snippets.

@jsbonso
Created May 23, 2018 11:27
Show Gist options
  • Save jsbonso/6d907ebfdd6915459487839b5f72ad79 to your computer and use it in GitHub Desktop.
Save jsbonso/6d907ebfdd6915459487839b5f72ad79 to your computer and use it in GitHub Desktop.
JavaScript and CSS Reviewer
1. What's the difference between a DIV and SPAN?
- Span is in-line level and div is block level.
2. How to include the padding and border in an element's total width and height in CSS?
- Use Box Sizing: https://www.w3schools.com/css/css3_box-sizing.asp
3. How to create 2 equal DIVs?
4. How to change the second <li> of the list to red color?
- Use the nth-child property
- Example:
li:nth-child(2):before {
content: "• ";
padding-right: 8px;
color: green;
}
5. What is {} === {} ?
- Answer is false.
6. "===" vs "=="
7. How to avoid overlapping DIVs
8. How to remove a certain string from a word
9. How to use a REGEX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment