- From: Ivan Chaer <ivan.chaer@gmail.com>
- Date: Fri, 28 Sep 2012 13:34:51 +0200
- To: www-talk@w3.org
Received on Friday, 28 September 2012 12:46:06 UTC
Hi,
It would be useful to have a CSS pseudo element that wrapped the referenced
element.
With it, we would need less html whenever a single element needs to be
wrapped.
This happens frequently when I have to deal with titles decorated with
lines, like:
Title -------------
or
------ Title ------
So, for example, if we had a pseudo element called, say 'around', I would
need a single element, like:
h1::around {
display:block;
background: url('lines.png') center center repeat-x;
text-align:center;
}
h1 {
display:inline;
background: white;
padding: 0 10px;
}
I searched through the web, and found no smart way to do it, so I am
currently placing a span inside the h1 to achieve this effect.
Many thanks,
Ivan
Received on Friday, 28 September 2012 12:46:06 UTC