如何格式化 id 中的类 class?

Cur*_*ous 0 css class css-selectors

我有以下 HTML:

<div id="footer">
  <div class="wrapper clear">
    <!-- stuff -->
  </div>
<div>
Run Code Online (Sandbox Code Playgroud)

我应该在 css 文件中放入什么来格式化具有包装类和清除类的 div,但仅限于页脚内?

这是与 wordpress.com 一起使用的,所以我无法更改 HTML。

Bol*_*ock 5

使用此选择器:

#footer .wrapper.clear
Run Code Online (Sandbox Code Playgroud)

请注意,IE6 不能正确处理多个类选择器,它将上述内容视为这样(请参阅此处进行比较):

#footer .clear
Run Code Online (Sandbox Code Playgroud)

但在大多数情况下,这应该不重要。