There is an example.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<title>An XHTML 1.0 Strict standard template</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<style>
DIV#outer {
display: inline-block;
width: 100px;
height: 100px;
background-color: blue;
}
DIV#inner {
display: inline-block;
width: 50px;
height: 50px;
background-color: green;
}
DIV#inner:before {
display: inline-block;
content: '123';
background-color: red;
}
</style>
</head>
<body>
<div id="outer">
<div id="inner">
</div>
</div>
</body>
</html>
'#inner:before' pseudoelement is rendered inside '#inner'. To make it be rendered outside, I need to replace selector in last css block with 'DIV#outer:before', so it will be rendered inside '#outer', but before '#inner'. The question is why I'm observing such behaviour? w3schools says that "The :before selector inserts content before the selected element(s)". Before element, but not before content of element.