Новый для css здесь. У меня есть речевой пузырь ниже, и я хочу, чтобы тег span был расположен относительно divcontainer. Как это сделать, не влияя на отображение псевдоэлемента?
HTML (пример):
<div id = 'divcontainer'>
<span> </span>
</div>
CSS:
#divcontainer
{
position: relative;
}
span
{
position: relative; /* I want the span tag to be positioned relative to the div.*/
left: 18px;
top: -15px;
white-space: nowrap;
font-size: 12px;
background: white;
border: 1px solid white;
border-radius: 7px;
padding-bottom: 5px;
visibility: hidden;
}
span:after {
content: '';
position: absolute;
bottom: 0;
left: 45%;
width: 0;
height: 0;
border: 18px solid transparent;
border-top-color: white;
border-bottom: 0;
border-left: 0;
margin-bottom: -10px;
}
Любой рука очень благодарна!