Real quick one pls

#adiv .Item p {
}

would this select all paragraphs inside a div with a class of ‘.Item’ only in a div with an ID of ‘adiv’

Is this ok?

cheers

It would select paragraphs that were contained within an element having a class of Item which itself was inside an element that had an id of adiv. Whether those elements are divs or not is not defined.

It would select this item as follows:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
#adiv .Item p {
    background:red;
}
</style>
</head>
<body>
<div id="adiv">
    <div class="Item">
        <h2>This isn't red</h2>
       [B] <p>this is red</p>[/B]
    </div>
    <p>This isn't red</p>
</div>
</body>
</html>


perfect cheers dude, your the man :wink:

Tsk tsk. :nono:

That should be ‘… inside an element that had an id of adiv’ (not ‘#adiv’).

You really think that Paul would know these things after all those years. I guess it’s evidence of the onset of old age … :stuck_out_tongue:

:rofl:

Your time will come :slight_smile: