How we avoid nth child property in our css


How we avoid nth child property in our css
When we us nth child property so we have limitation because we have control only on nth child, but some times its make alignment issues in responsive width. Take an example for avoid this problem.

1 2 3 4 5 6 7 8
Here "box-content" have -10px left margin. and "box-content_child" have 10px left margin. now edge of last-child box touches the main div. In this example you clearly see there is no any margin in right side of div, because we use 10px margin in left. Now take another example, here we give main block -10px margin from top. amd child blocks, we give 10px margin from top.
1 2 3 4 5 6 7 8

Comments

Popular posts from this blog