Eliminating the margin caused by Twitter Bootstrap's span

Utilizing bootstrap, my aim is to display two spans side by side without any white margin between them. However, when I implement the code, there seems to be a white margin between each span.

This is the code in question:

<li class="span4" >
    <div class="thumbnail">
         <img src="img/placeholder-360x200.jpg" alt="product name">
             <div class="container row-fluid">  
                  <b>
                     <span class="span6 nospace" id="one"> <font size ="5px"><i>PHP 100,000</i></span>

                     <span class="span6 nospace pull-right" id="two" >50% Off </span>
                               </font>
                </b>

              </div>
           <div class="caption">

                <p>
                  Few attractive words about your product.Few attractive words about your product.
                </p>

              </div>

                  <div class="widget-footer">
                <p>
                  <a href="#" class="btn btn-primary">Buy now</a>&nbsp;
                  <a href="product.html" class="btn">Read more</a>
                </p>
                  </div>  

            </div>
          </li>

In an attempt to solve this issue, I added the following CSS:

.nospace{
margin-left: 0;
}

However, despite my efforts, the output still displays the white margin between the spans.

I am looking for a solution that will allow me to have the spans appear side by side with no white margin in between.

Answer №1

if you want to eliminate margin, it's recommended to utilize span class within the row-fluid class.

Answer №2

Give this a shot

.span6.nospace{
margin-left:0;
}

============================================

Alternatively, you can try using this method, although it is not recommended

.nospace{margin-left:0 !important;} //  

Answer №3

when working on your code, remember to use ` PHP 100,000

        <span class="span6 nospace" id="two" >50% Off </span>`

Kindly refrain from using pull-right or pull-left in Twitter Bootstrap for better design consistency.

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

Opera browser fails to render CSS3 box shadow effect

My menu features CSS3 effects on hover and active states, giving it a unique appearance. Below is the CSS3 styling I have implemented: #Menu a:active, #Menu a.active:before,#Menu a:hover:before { Content: ' '; position:absolute; z-i ...

Struggling to get my upload form to function properly with two different versions of jQuery, even after attempting to use jQuery.noConflict

I am facing an issue with a webpage that contains two different forms. The first form is for uploading pictures and generating the link for the uploaded images, while the second form is a regular one used to add products to a database using the links from ...

Trouble with CSS and JS tabs not activating when clicked?

I am experiencing issues with a navigation (organized in tabs) that is not functioning on this page, but it works correctly on this page using the same method for inclusion. When clicking "Norway" on the top left, the navigation opens but switching to the ...

Dynamic SVG positioning

Looking for a way to make this svg shape relative to its containing div? Fiddle: http://jsfiddle.net/8421w8hc/20/ <div> <svg viewBox="0 0 1000 2112" style="" xmlns="http://www.w3.org/2000/svg" version="1.1"> <path id="ma" st ...

Reduce image_tag into a single

Is there a way to combine all image_tag picture tags into one for compression? I'm currently using Nivo slider in the header and would like to avoid writing out each image tag in the layout page. Can you suggest any solutions? Thanks in advance. ...

Transform the styles from a React component into Cascading Style Sheets

I have been tasked with transitioning all the styles from the JavaScript file to the CSS file while ensuring the design remains intact. I am facing an issue where using the CSS styles breaks the search field design. The original design can be seen here: S ...

What is the best way to incorporate a CSS transition without any dynamic property changes?

Is there a way to add a transition effect to a header when its size changes without a specified height value in the CSS? The header consists of only text with top and bottom padding, so as the text changes, the height adjusts accordingly. How can I impleme ...

How can the size of the font in a <div> be adjusted based on the number of characters present?

I am attempting to create a basic HTML and CSS layout with two div blocks, each 1000px wide, within a parent container that is 3000px wide. <div class="blocks"> <div class="block-a">text 1</div> <div class="block-b">text 2& ...

AngularJS: The dynamic setting for the stylesheet link tag initiates the request prematurely

I'm encountering a problem that is somewhat similar (although not exactly the same, so please be patient) to the one discussed in Conditionally-rendering css in html head I am dynamically loading a stylesheet using a scope variable defined at the sta ...

Utilizing Bootstrap 3: Achieving Varied Font Sizes within a Row with Bottom Alignment

Just starting out with Bootstrap and looking to create a layout with two columns of text in the same row, where the first column has a larger font size than the second. However, I'm running into an issue where the text in the second column is position ...

Using grid system within the <nav> tag: a comprehensive guide

I've been working on incorporating the grid system with row and col using bootstrap 4.0, but I've run into an issue. When I use the <div> tag, everything seems to be working smoothly: <link href="https://maxcdn.bootstrapcdn.com/boots ...

Different styles of Unicode arrowheads found on different versions of Android devices

Here is the HTML/CSS code I'm using to create a "Play" button with an arrowhead symbol. The code utilizes ▶ and &9658; to achieve this functionality. <div class='audio-container'> <p style="text-indent:0em;"> <aud ...

The words streaked across the page like shooting stars, leaving

On my website, I'm facing an issue with text overflowing off the page when the podcast listing page is viewed on a small screen: https://i.sstatic.net/ZAR6Z.png I stumbled upon this helpful Stack Overflow answer that suggests using a specific CSS cl ...

Foundation 5.2.2: Creating a Dropdown Menu

Would it be possible to achieve this effect using Foundation: https://i.stack.imgur.com/UyYqK.png ? I am interested in implementing 2 COLUMNS in the TopBar Menu: foundation.zurb.com/docs/components/topbar.html I came across a MegaMenu (codepen.io/winghou ...

Tips for eliminating the gap separating the authentication design from the additional elements within the Laravel, Vue, and Inertia framework

I'm currently working with Laravel and Vue using Inertia. When I log into the system, the authentication layout creates a space at the top of the page. How can I resolve this issue? Here is an image highlighting the space I need to remove, marked wit ...

Modifying the Inactive Tab Color in Material UI

For my application, I have a specific requirement where the active tab needs to be styled in red and the inactive tab in blue. Here is how the styling is set up: newStyle: { backgroundColor: 'red', '&$selected': { b ...

Div with full height will not have scrollbars

As I work on developing a chat site, I've come across a peculiar issue with the chat display feature. Currently, my jQuery code dynamically adds chat rows to a div. My goal is to set the height of this div to 100% so that it adjusts based on the user& ...

What is the best way to create a scrollable table that extends to 100% of the available width within its container, without taking up the

In the application, there is a collapsed sidebar on the left labeled "sidebar-left" and a container on the right with various types of content labeled "content." The issue arises with the width of this container, as it needs to take up 100% of the remainin ...

Is there a way to dynamically change the height in jQuery/JavaScript?

I am encountering an issue with my embed code where the height changes randomly after a few seconds, depending on certain parameters. Here is an example of the code I am using: $( <embed></embed>) .attr("src", "http://www.bbs.com") ...

aligning content that has exceeded the boundaries

I have a list of dynamically created <a> tags without text, to which I apply background images. These icons are displayed within a <div> container using the float: left; style. As the row of icons becomes too long, it overflows and starts a ne ...