0

Using a GWT web app, Firebug says that the following HTML

<table class="drop-zone drop-zone-column-66 multi-zone">
...
</table>

is using this CSS.

.maximized-gadget .drop-zone.multi-zone, .configure-tab a {
    display: block;
}

What CSS do I need to write so that this <table> will have style, display: none?

I made 2 attempts: [EDIT - updated .multi-zone and display:none]

.drop-zone .drop-zone-column-66 .multi-zone {
    display: none;
}

and

.maximized-gadget .drop-zone.multi-zone, .configure-tab a {
    display: none;
}

but Firebug still gives me the CSS shown at the top.

Please advise me.

1 Answer 1

1

Strictly speaking, all you should need is:

.maximized-gadget .drop-zone.multi-zone {
    display: none;
}

provided that that rule comes after the original rule you gave above:

.maximized-gadget .drop-zone.multi-zone, .configure-tab a {
    display: block;
}

Depending on what the structure of the rest of your document is and what you're trying to do, you may need to add some specificity to that rule.

The problem with your first attempt is that your rule would apply to an element with a class of multi-zone which is a descendant of an element of class drop-zone-column-66, which in turn is a descendant of an element of class drop-zone. What you want is to target an element that has all three of those classes set on it, which you can do by chaining those selectors:

.drop-zone.drop-zone-column-66.multi-zone {
    display: none;
}

which should set you right (though if I remember correctly this won't work in older versions of IE).

Sign up to request clarification or add additional context in comments.

6 Comments

Unless I'm misunderstanding the whole thing, you're trying to set display: none on your table, but in both of your attempts above you have it as display: block, which is how it's already set
My fault - another typo. I mistakenly wrote 'display: block' rather than 'display: none' Also, I tried both of your recommendations, but neither worked for me. I'm thinking it's possible for a "!important" to be screwing me up. The team I'm on has used them before as workaround hacks.
yeah, !important can end up biting you in the ass, it should definitely be avoided.
Well, I take back what I said about '!important.' I just checked my CSS, and I did not see any '!important' keywords in any of my affected classes' CSS.
And you're sure the new rule is after the original rule in the cascade?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.