What could be the reason for the Bootstrap 3 row not expanding to accommodate the content?

I am working with the following HTML structure:

<div class="container-fluid">
    <div class="row">
        <div class="col-sm-push-3 col-sm-6 text-center wrapper">
            <div class="col-sm-4 inner-wrapper">
                <span class="text-center circle">A</span>
                <p class="text-center center-block">Click Start Now</p>
                <a href="" class="text-center center-block start-now">Start Now</a>
            </div> <!-- col-sm-4 -->
        </div> <!-- col-sm-6  -->
    </div> <!-- row -->  
</div> <!-- container-fluid -->

There will be two more elements with the class col-sm-4 inside the col-sm-6.

Additionally, I have the following CSS applied:

.container-fluid{
    margin:10% auto
 }

.wrapper{
    color: #fff;
}

.inner-wrapper{
    background-color: #ccc
}

.circle{
    border-radius: 50%;
    border: 1px solid #d1cfc8;
    background-color: #000;
    padding: 5% 15%;
    font-size: 300%;
 }

.start-now{
    color: #fff;
    background-color: #96d0f1
}

View the code live with Boostrap on this fiddle: http://jsfiddle.net/aq9Laaew/93303/

However, the circle element is extending beyond the row and is not fitting the content properly. It is also extending behind the <p> element below it.

What could be causing this issue? Could it be related to the pseudo element before the row or is there a limitation on increasing the margin to that extent?

Answer №1

It seems like the circle is overflowing from the top of the container because it is set as a span with a default inline display. This causes the element's height to not be properly accounted for in the document flow. To resolve this, simply add display:inline-block to the .circle element and the issue will be resolved.

http://jsfiddle.net/2r4bsTW/

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

Error in HTML5 video: Unable to access property '0' as it is undefined

I am trying to create a simple block displaying an HTML5 video tag. I want the ability to play different videos along with their titles from a JSON file by using previous and next buttons. Clicking the next button should play the next video, and the same g ...

Learn how to maintain floating labels in a floating state even after text input using only CSS

Figured out how to make labels float above form input fields when focused, but struggling with keeping them floating when text is entered and field is unfocused. Been searching for CSS examples online, but none seem to clarify how to achieve the desired e ...

What is the best method to "deactivate" a radio button while ensuring that a screen reader can still read the text and notify the user that it is inactive?

My current situation involves needing to deactivate certain radio buttons, while still having the option to reactivate them later. When I use the disabled attribute, screen readers will overlook this field and miss key information. I am seeking an accessi ...

Struggling with flipping div functionality in IE9 on flipping content demo

I recently developed a flipping div using transitions and 3D transforms based on the Flipping Content Demo 1 from . While this works smoothly on most browsers, unfortunately IE 9 does not support transitions and 3D transforms. In order to address this iss ...

best practices for choosing items from a dropdown menu using Angular

I have a dropdown list displaying existing tags/chips created by users in the past. However, I'm having an issue where when I select a tag from the dropdown list, it doesn't show up in my input field (similar to the Chart tag currently). I am abl ...

Emphasizing buttons that are in a "pressed" or "inactive" state

I've implemented three push buttons in my code using input with type="button", which act as toggle buttons (on/off). In the past, I used images to indicate when a button was pressed or reset, but now I want to achieve this effect using CSS. However, ...

"Phone calls at the click of a button with Twilio

I need to create a webpage where users can click a button to make a call to our office phone number directly from their browser. The code runs without any errors in the debugger, but when I try clicking the button on the page, nothing happens. There are ...

What is the best way to insert a Bootstrap Glyphicon into an asp:TextBox within ASP.Net Webforms?

Can a Glyphicon be displayed in an <asp:TextBox> control? I attempted the following: <div class="col-md-10 has-feedback"> <asp:TextBox runat="server" ID="txtFullName" CssClass="form-control" MaxLength="50" /> <i class="glyph ...

Arrange the child elements of a div to be displayed on top of one another in an HTML document

I am struggling with a div containing code .popupClass { width: 632px; height: 210px; position: absolute; bottom:0; margin-bottom: 60px; } <div class="popupClass"> <div style="margin-left: 90px; width: 184px; hei ...

Creating a persistent table header and first column in HTML tables

I am having trouble getting the header column to stick to the top along with the first column beneath it. Here's what I'm aiming for: https://i.stack.imgur.com/hzVt8.png Despite my efforts, I can't seem to make it work. I've experimen ...

CSS radio button not showing up on Safari browser

I am encountering an issue with my vue app where it functions correctly on Google Chrome but experiences problems on Safari. Specifically, the issue arises with components containing radio buttons. Upon clicking on a radio option, the selected color (blue) ...

Best practices for implementing localization in AngularJS 1.5.x

Visit this link When working with newer versions of the framework (>=1.4.0), it is recommended to utilize the built-in i18n tools. For older versions (<1.4.0), angular-translate is a suitable option. The documentation provides detailed steps for ...

What are some strategies for increasing my website's mobile responsiveness?

I've recently completed my online portfolio, and it appears to be functioning properly on desktop computers. However, I'm encountering responsiveness issues when viewing it on other devices or smartphones. Even though I have included the necessar ...

Apply a specific class to the input field when the name matches x

I have a website that loads a JavaScript file from a commercial service, so I am unable to customize this file. The output of this JavaScript file is a form with various input fields, all of which have the class name "wf-input". I now want to add a jQuery ...

Tips on aligning vertically centered left and right floating objects without having to use the line height property

          Here is the issue I am facing http://jsfiddle.net/vT4YT/ <table><tr><td><div></div><div></div></td></tr></table> You can see that the options and row text are not vertic ...

Tips for Integrating a Facebook Shop Page into Your Website

Can a Facebook shop page be integrated into a website? Any guidance on how to accomplish this task would be greatly valued. ...

Developing several sliders and ensuring they operate independently of each other

I am currently in the process of developing multiple sliders for a website that I am building. As I reach the halfway point, I have encountered a problem that has stumped me. With several sliders involved, I have successfully obtained the length or count ...

Display a progress bar in an application to visualize the loading of database records

Within my application, I am accepting a numerical input that is used to generate results on a separate page. The process involves running multiple sequential JDBC queries against Oracle database tables, resulting in a significant delay (1-2 minutes) for th ...

Stuffing a container with an image without considering the proportions

I am experimenting with filling a parent <div> with an image without concern for proportions. Despite knowing that it may not look great at all sizes, I just want to test its feasibility. Currently, the image is scaling instead of stretching to fit m ...

The table printing settings are not compatible with portrait and landscape orientations

I am facing an issue with printing a table on my webpage. When I try to print using Control+P or window.print();, the width of the table does not adjust properly for portrait or landscape orientation. The table ends up exceeding the paper width. How can I ...