Alignment of Bootstrap Card Header: right floater

What method can I use to align my small text to the right in a Card Header using Bootstrap 4?

HTML

<div class="container">
  <div class="row">
    <div class="col">
      <div class="card">
        <!--CARD HEADER-->
        <h4 class="card-header">HEADER <small class="pull-right">right aligned</small></h4>
        <!--CARD BODY-->
        <div class="card-body">
        </div>
      </div>
    </div>
  </div>

This is my attempt:
https://jsfiddle.net/LL0qnnxm/60/

Answer №1

To keep up with the changes in Bootstrap 4, use float-{sm,md,lg,xl}-right instead of pull-right. For more information, refer to this link.

For a solution, please view the updated version on this Fiddle

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

Dynamic navigation menu shifting when bolded

Looking at my menu, you'll notice the following layout: If one clicks on Recruitment in the menu, it correctly bolds the text as intended. However, an issue arises where the entire menu unexpectedly shifts 1 or 2px to the left. The menu is implemente ...

How can you target a custom tag using a wildcard in CSS?

Within my Angular application, I have various component pages such as <app-page-home>, <app-page-login>, <app-page-documentation>, etc. that are displayed when needed in the <router-outlet>. I am facing a challenge where I want to ...

Display a triangle underneath the chosen menu option

How can I display a small triangle below the selected menu item, similar to my tag box? I have tried various methods without success. You can view my attempts at this link. Any suggestions on how to achieve this? Thank you! nav { float: right; m ...

Use CSS to apply a gray overlay to a portion of an image

I'm attempting to add a greyed out effect to specific sections of an image (two stripes on the left and right). Is there a CSS-only solution for achieving this? I am aware that filters can be used (e.g. filter: grayscale(100%)), but I only want certa ...

Knitting: exporting to HTML file while retaining formatting

Recently discovered the amazing knitr library in R, which looks great when viewed in the viewer. But unfortunately, the style gets lost when saved to an html file. Code library(knitr) library(kableExtra) some.table <- data.frame ( x = rep(1 ...

Challenges with Image Alignment Using Bootstrap 4

I'm having trouble aligning images using Bootstrap 4. I placed them inside a .row within a .container, but there is unwanted whitespace between the images. My goal is to have the images sit right next to each other with no gaps. Any suggestions on how ...

"Trouble with Animations: Animate.css not functioning

I've been attempting to implement the animate.css plugin into my code, but for some reason, I just can't seem to get it working properly. Can anyone point out where I may have made a mistake? Here is the code I am using: <html> <head& ...

"Implementing a Drop-Down Menu within a Text Field using Bootstrap

I'm looking to integrate a dropdown menu within my text input field with the help of Bootstrap: <script type="text/javascript"> $(document).ready(function(e) { $('.selectpicker').selectpicker(); $('div.cow&apo ...

Encountering an error message stating that the "@font-face declaration does not adhere to the fontspring bulletproof syntax" while attempting to integrate a custom font

I've been struggling to incorporate a unique font into my website, but I keep encountering the same error every time. Despite my efforts, I haven't found much guidance on how to rectify this issue. Below is the code I'm using: @font-face ...

ngx hierarchical dropdown

Is it possible that the 'disabled' attribute is not a recognized property of the 'ngx-dropdown-treeview' component? The ngxDisabledOnSelector property seems to be malfunctioning in my specific case. This is my code snippet: <ngx-dr ...

Steps to designing an Arrow with styled-components

I am currently working on customizing my orange arrow to resemble the pink arrow, but I want to achieve this without relying on an external CSS library like bulma. The reason the pink arrow looks different is because it utilizes the bulma library in its st ...

Text in Bootstrap Carousel shifting during transition to active item

I'm encountering a problem similar to the one discussed in this thread about Bootstrap Carousel Caption movement after transition. Despite reading and attempting the solutions provided, I still haven't been able to resolve my issue... In my case ...

Unusual problem detected with scrolling fixed div upwards

I have encountered a peculiar issue while attempting to fix a div containing other nested divs. My goal is to have the .menu div remain visible and fixed at the top of the page while scrolling, hiding the .slideshow_head div. However, despite fixing the . ...

Display selected divs with dropdown box but show all divs when no option is chosen

I came across a helpful code on this website while working on my own website. After customizing it to my liking, I encountered some issues. My main goal is to have all divs displayed when no value is selected from the dropdown box. Below is the code that I ...

Make the <a> element expand to the size of its parent element

Currently, I am working on filling a div element with a link element created using Laravel. <li class="{{ Active::route('guide-dashboard') }}"> <div class="dashboardLink"> <i class="fa fa-envelope-o dashboardIcon"></i&g ...

Influencing the movement of one div container using another dynamic div

Apologies for the unclear title. Check out a JsFiddle DEMO to see what I mean. My goal is to move the black container as soon as it touches the red container. I want to prevent the overlap between the two and adjust the position of the red container relat ...

choose a div with additional padding at the top

I am looking to create a dropdown menu with a custom arrow design. I have attempted to achieve this by wrapping my select element in a div with an arrow image background. The issue I am facing is that the select element seems to have 3-4 pixels of top p ...

Difficulty with NodeJS, Hapi, and Cascading Style Sheets

I've decided to challenge myself by creating a small webhost using Node.js with hapi. Even though I'm not an expert in Node.js, I am eager to learn as much as possible. Currently, my main issue revolves around fetching a CSS file from an include ...

I am trying to set the text direction to RTL for the window.getSelection value. However, I'm having trouble figuring out how to remove getSelection from the current value

var userInput = document.getElementById('inputText').value; function insertAtCursor() { if (window.getSelection) { selectedText = window.getSelection(); ...

Achieve full-width child elements within a flex parent using Angular

In my Angular application, I have a main flex container called main-container with a child element named box. The goal is to center the child element within the parent and make it take up 100% of the parent's width. However, due to padding settings, t ...