apply css to first div only code example Example: select first div css #content div:first-child { /*css*/ }