adding child and hasclass possibility on media queries