Apply bottom margins in Bootstrap 4 ONLY in xs (smartphone and iphone)

Since the classes apply their styles in increasing screen size and CSS is cascading you can use the second class to override the first one. In your example that could be: <div class=”mb-4 mb-sm-0″></div> which overrides the first class, when the second one activates. .mb-4 { margin-bottom: 1.5rem !important; } @media (min-width: 576px) { .mb-sm-0 … Read more

How to programmatically use bootstrap icons in an angular project?

Quite old, but since I had the same problem and these answers where not helpful at all, here is the Solution I came up with. First install the bootstrap icons package (–save adds it to your dependencies as well): $ npm i bootstrap-icons –save Then add this line to your styles.css file: @import “~bootstrap-icons/font/bootstrap-icons.css”; From … Read more

Bootstrap 4 float-right inside .row

row is a flex container in bootstrap-4, to align content in flex-container you need to use ml-auto and mr-auto. Here’s the example: <link rel=”stylesheet” href=”https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css” integrity=”sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS” crossorigin=”anonymous”> <div class=”row ml-1″> <div> Hello from left </div> <div class=”ml-auto mr-3″> Hello from right </div> </div> Here’s the official docuemtation link and example: https://getbootstrap.com/docs/4.0/utilities/flex/#auto-margins For cases like when … Read more

Bootstrap 4 Multiple fixed-top navbars

Yes, it’s possible but you have to position the 2nd one accordingly. The height of the Navbar is ~56px. .fixed-top-2 { margin-top: 56px; } body { padding-top: 105px; } <nav class=”navbar navbar-toggleable-sm bg-faded navbar-light fixed-top fixed-top-2″> <button class=”navbar-toggler navbar-toggler-right” type=”button” data-toggle=”collapse” data-target=”#navbar1″> <span class=”navbar-toggler-icon”></span> </button> <a href=”https://stackoverflow.com/” class=”navbar-brand”>One</a> <div class=”navbar-collapse collapse” id=”navbar1″> <ul class=”navbar-nav”> .. … Read more

bootstrap 4 row height

Use the sizing utility classes… h-50 = height 50% h-100 = height 100% http://www.codeply.com/go/Y3nG0io2uE <div class=”container”> <div class=”row”> <div class=”col-md-8 col-lg-6 B”> <div class=”card card-inverse card-primary”> <img src=”http://lorempicsum.com/rio/800/500/4″ class=”img-fluid” alt=”Responsive image”> </div> </div> <div class=”col-md-4 col-lg-3 G”> <div class=”row h-100″> <div class=”col-md-6 col-lg-6 B h-50 pb-3″> <div class=”card card-inverse card-success h-100″> </div> </div> <div class=”col-md-6 … Read more

Fix Warning “Also define the standard property ‘box-shadow’ for compatibility”

It means you should add the standard style rule (box-shadow) in addition to the vendor prefixed version (-webkit-box-shadow) .scrollbar-black::-webkit-scrollbar-thumb { border-radius: 10px; -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1); // <- Add this to fix. background-color: #000; }

Can I use React Bootstrap with Next.js?

Yes, it is possible to use react-bootstrap in a nextjs application. One of the problems you might encounter will be in the rendering of your application if javascript is disabled in the user’s browser and you use react-bootstrap components to build your layout (see example below). Nextjs allows you to display SSG/SSR pages, users without … Read more

Can’t Toggle Navbar in Bootstrap 4 in Angular

It looks like you might have been looking at this example from Bootstrap. I did, and had the same issue. The problem is it is not an angular example so it won’t work. To make it work you have to use the (click) event and a variable. So change your template to <nav class=”navbar navbar-expand-md … Read more

In React, how can I cause anchors to do nothing on click?

You should call preventDefault function from onClick event like this: class App extends React.Component { onClick = (e) => { e.preventDefault() console.log(‘onclick..’) } render() { return ( <a href onClick={this.onClick} >Click me</a> ) } } You can use something like this particular to your use case: const renderEmails = ({ fields }) => ( … … Read more