I am having some difficulty with absolute positioning in the element and not the parent with bootstrap.
The desired behaviour should be a 1px line running through the middle of the h3 (after other styling "behind"). The CSS comes from another theme and works there. However, with the bootstrap framework the bottom: 50%;
is 50% of the way down the containing element which is miles off.
This is my CSS
#sidebar .widget-title:after {
background-color:#485729;
}
.widget-title:after {
position: absolute;
content: "";
bottom: 50%;
left: 0;
width: 100%;
height: 1px;
background: transparent;
}
This is the HTML in question
<div class="order-md-1 col-md-3" id="sidebar">
<h3 class="widget-title"><span>My Nice Title</span></h3>
<p><a href="#">LINK!</a></p>
<h3 class="widget-title"><span>Hello World</span></h3>
<!-- lots of Lorem Ipsum -->
</div>
The net result should look like:
--- My Nice Title -----------
Instead, the line is halfway down the page.
My Nice Title
-----------------------------
All of the lines for the h3 elements are in exactly the same location. This leads me to believe that the positioning is 50% of the parent div and not the h3. As this works on the non-bootstrap theme, my guess is bootstrap does something just different enough to trip me up. I am not sure what though.
How do I go about achieving the desired behaviour?