I have the following HTML:
<div id="foo开发者_运维百科ter">
<div class="wrapper clear">
<!-- stuff -->
</div>
<div>
What do I put in the css file to format the div that has a class of wrapper and clear, but only when within the footer?
This is for use with wordpress.com, so I can't alter the HTML.
Use this selector:
#footer .wrapper.clear
Note that IE6 doesn't handle multiple class selectors correctly, it treats the above as this (see here for a comparison):
#footer .clear
But in most cases this should not matter.
I think what you are looking for is this:
#footer div[class="wrapper clear"] { /* your awesome CSS code */}
精彩评论