I have the following CSS I need to apply to only a particular div (because of conflicts):
The div in question has the class name datepicker-days. Do I declare the be
Just use the descendant selector:
.datepicker-days table {
/* this rule will only apply to `<table>` elements that are descendents of any element with class "datepicker-days" */
}
.datepicker-days { /* Targets the div */ }
.datepicker-days table { /* targets all tables nested in the div */ }
.datepicker-days > table { /*targets only tables that are direct children on the div */ }
You would do the following:
.datepicker-days table {
Styles here;
}
This looks for <table>
with the .datepicker-days
class only
If you only need to apply a specific style to one unique div, why not give it an id #