I am currently working on a project that is functioning perfectly fine in this link: https://jsfiddle.net/4xd47wcg/. The main objective is to have the dots connect to the prices without overlapping the text.
However, when I attempt to make the design responsive by incorporating Bootstrap, an issue arises where the dots start appearing under the words as shown here: https://jsfiddle.net/619LLsqs/1/. I adjusted the color for better visibility, but I cannot seem to pinpoint the cause of this problem. Any insights or suggestions would be greatly appreciated!
Thank you!
<p>
<span class='descripcion'>Trócola</span>
<span class='precio'>56´72</span>
</p>
<p>
<span class='descripcion'>Junta la trócola</span>
<span class='precio'>0´33</span>
</p>
<p>
<span class='descripcion'>Gamusinos en oferta c/u</span>
<span class='precio'>6´47</span>
</p>
* {margin:0;padding:0;border: 0 none;position: relative;}
html, body {
background: gray;
padding-top: 1rem;
font-family: muli;
font-weight: 300;
font-style: italic;
color: black;
}
p {
background: inherit;
width: 70%;
max-width: 40rem;
min-width: 300px;
margin: 0 auto;
font-size: 1.2rem;
line-height: 1.5rem;
color: #fff;
padding-right: 4rem;
margin-bottom: .5rem;
color: black;
}
p:before {
content: '';
position: absolute;
bottom: .4rem;
width: 100%;
height: 0;
line-height: 0;
border-bottom: 2px dotted #ddd;
}
.descripcion {
background: inherit;
display: inline;
z-index: 1;
padding-right: .2rem;
}
.precio {
background: inherit;
position: absolute;
min-width: 4rem;
bottom: 0;
right: 0;
padding-left: .2rem;
text-align: right;
z-index: 2;
}
h1 a {
display: block;
text-decoration: none;
color: rgba(0,0,0,.55);
margin-bottom: 1rem;
text-align: center;
transition: .5s;
}