> On Feb 26, 2021, at 4:09, Larry Martell <larry.mart...@gmail.com> wrote: > > In an app I am working on there is this global CSS: > > #preview div#results_holder table:not(.other-table), > #preview div#results_holder div.results_holder table:not(.other-table) { > margin-top: 0px !important; > } > > On one page I want to have a top margin of 50 on an element with id > results_holder. > > I have tried putting the style on the element itself, and also tried > adding an ID to it and adding this: > > #preview div#CFA_results_holder { > margin-top: 50px !important > } > > But neither one takes. How can I override the top margin just for this > one element?
Give the very high specificity of your first two selectors, that is expected… read here: https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity this is a cute illustration of specificity: https://cssspecificity.com You’ll need to seriously up the specificity of your `#preview div#CFA_results_holder` to be able to override that. Philippe -- Philippe Wittenbergh https://l-c-n.com/ ______________________________________________________________________ css-discuss [css-d@css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/