Le 25 déc. 2010 à 15:31, Andrew Fedoniouk a écrit :
> <div>
> text 1
> <p>text 2</p>
> </div>
>
> If I want to draw 1px solid red;
> border around that box how would I do so?
There is something strange in the request itself. I understand the appeal for such features… and if we push further the reasoning it seems to lead to regex (insert nightmare stories here :) ), *but* it isn't what markup is for, aka *marking up* texts with *tags* so they have a specific purpose.
if I understand the requirement
So we have
//select the div box
div
//select the p box inside the div
div p {}
// select the text inside div but outside p
which is different from XPath expression which select every text nodes under an element.
http://www.w3.org/TR/xpath20/#id-matching-item
Then the evil is hidden in details
Would style apply to text 1 and text 3?
<div>text 1<p>text 2</p>text 3</div>
What's happening with spaces?
<div>text 1 <p>text 2</p> text 3</div>
What's happenning with display: none on "div p"
--
Karl Dubost - http://dev.opera.com/
Developer Relations & Tools, Opera Software