Bootstrap Row Problem Impacting Code Structure

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;
}

Answer №1

The problem lies in the background-color settings for .descripcion and .precio. In a fiddle without bootstrap, they are inheriting the background-color of the body which is set to grey, but in a bootstrap fiddle, they are inheriting a transparent background-color instead.

Check out the updated Fiddle here: https://jsfiddle.net/619LLsqs/2/

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to display a link in an iframe across the entire browser tab?

My goal is to enhance the consistency of my website's subpages by placing the header in an iframe-element and styling it with CSS. However, I encountered an issue where clicking on a header link only loads the new page within the iframe. Is there a so ...

Prompt for user confirmation when a button is clicked using jQuery

I'm facing a situation that I haven't found an answer for yet. I have a button on my webpage that triggers an ajax call to perform a certain action when clicked. However, I want to add a confirmation popup with the message "Are you sure you want ...

Performing subtraction on two arrays in Javascript

Is there a way to eliminate all duplicate elements from one array list that are also present in another array list using the .filter() method of ES6 javascript? I am open to solutions in jQuery as well, but they must be compatible with IE11+ and Chrome fo ...

Issue with ng-if not functioning within custom component in Angular

I've been racking my brain trying to figure out why the 'ng-if' isn't functioning on this element. I understand that ng-if="true" might seem odd, but I just want to make it clear that the issue lies elsewhere. What am I missing? <di ...

What is the best way to center my items vertically in a material-UI Grid row?

Struggling to vertically align three items in a row using Material UI's Grid component. Despite setting "justifyContent: 'center'," it only horizontally centers the items. Here are my styles: const styles = (theme) => ({ root: { te ...

Utilizing rvest to extract user videos from Twitter

When using rvest to extract data from websites, I found that I am unable to scrape dynamic content. For instance, how can I extract the audience count (44K) from this video post? https://i.sstatic.net/CRXZ9.png Here's what I attempted: library(rves ...

What are the steps to adjust my table width without allowing horizontal scrolling?

1- I need help fixing the width of my table so that it stays within the screen. 2- Is there a way to display only the first 100 characters of table data and show the rest when clicked? Any assistance would be greatly appreciated. Here is a snippet from ...

OpenWeatherMap API call failing - not visible in Network tab of Console

I am facing an issue with my API call while trying to retrieve temperature data for a specific city. I am unsure if the problem lies with my API key or the code itself. Can you please provide guidance on how I can resolve this issue? Upon entering the city ...

Tips for sending <p> data to a router function with HTML

I am currently working on a page where users are presented with a list of unverified accounts, each containing its own form element. Each form has a "submit" button that triggers a POST call to /verify. However, I am facing an issue where the data within t ...

How can you specify the maximum width and height for a TextField in JavaFX using CSS?

Is there a way to set preferred and maximum width and height for a TextField using CSS? ...

Adding a class in Javascript if its parent element already has a class

I am trying to assign a second class to a div if one of its parent elements has a specific class. Here is the approach I took: var elements = document.querySelectorAll('h1,h2,h3,h4,p'); //SELECT ALL ELEMENTS for (var i = 0; i < elements.lengt ...

Animating a div to move up and down upon clicking using jQuery

Looking for a solution with my HTML setup: <div id="one">One</div> <div id="two">Two <br/> <br/> Two </div> <div id="three">Three</div> <div id="four">Four <br/> <br/> Four < ...

creating a horizontal drop-down navigation bar

I recently created a horizontal dropdown menu for my website and I have a couple of questions regarding the styling: 1. How can I incorporate a small blue triangle above the header border that would only appear on hover? Here is an example of what I&ap ...

What happens to the code that is situated *after* the closing of the HEAD tag and just before the opening of the BODY tag

I recently came across conflicting information regarding the placement of code between the HTML head and body tags. While it is considered bad practice and outside the spec, I have noticed an intermittent error in our complex code base that may be related ...

JQuery fails to keep up with the dynamic updates that angularjs effortlessly handles

Dealing with AngularJS has been a learning curve for me. <span data-end-time="{{ productAuctionEnd | date:'yyyy,MM,dd,HH,mm,ss' }},000" class="detail-rest-time js-time-left"></span> As I try to incorporate jQuery into the mix $(".j ...

saving Google Maps API v2 data for faster retrieval

Can geocodes be cached on Google Maps API v2? I have around 6.5k marks to display on my map, and the current script takes about 20 minutes to load them all. Is there a way to speed up this process without using latitude and longitude if it's not neces ...

PHP isn't sending data (even though the name tag is defined)

After reviewing numerous posts where individuals forget to include the name attribute in their input tags, I came up with a simple script: <form action="submit_form.php" method="post"> Name: <input type="text" name="name"><br> ...

Using jQuery, determine the value of the selected option in a table

I seem to be having an issue with JavaScript and HTML (Bootstrap). I found a snippet on Bootsnip and attempted to modify it for my job, but I made some errors in English on the third line. Here is my modified Bootsnip: $(document).read ...

Unable to add items to ListBox using jQuery .appendTo

Just dipping my toes into JavaScript and jQuery for the first time, so I might be missing something here. I've got a simple script that moves items from one ListBox to another: $('[id$=AddRole]').click(function () { $('[id$=MissingR ...

JavaScript program failing to execute

Seeking to incorporate a read more and read less feature that activates on click for my articles application using Django. However, encountering an issue where my JavaScript code does not work when the read more link is clicked. Below are the relevant fil ...