Top

Tags: Bootstrap

Bootstrap 4: Delete confirmation modal for list of items

Aug 05, 2020 | 737 views

#Django #Bootstrap

Refer to 

Comments: 0

Bootstrap: Align navbar's font with h1, h2, ..

Jul 29, 2020 | 674 views

#Bootstrap

Refer to here.

CSS code: 

h1,
.navbar-brand,
.navbar-nav a {
  font-family: 'Merriweather', serif;
}

check here to look which font you like: CSS Font stack

Comments: 0

Bootstrap 4: Autohide navbar when scroll down

Jul 29, 2020 | 827 views

#Bootstrap

So my code was reference to: Stackoverflow

and its relative code: HERE

CSS

.navbar-tran {
    transition: top 1.0s ease;
}

.navbar-hide {
    top: -56px;
}

HTML:

<nav class="navbar navbar-tran navbar-expand-lg sticky-top navbar-dark bg-dark">
...

jQuery:


/* When the user scrolls down, hide the navbar. 
 * When the user scrolls up, show the navbar */
// document ready
(function ($) {
    
var previousScroll = 56;
    // scroll functions
    $(window).scroll(function(e) {                                                       
    
        // add/remove class to navbar when scrolling to hide/show
        var scroll = $(window).scrollTop();
        if (scroll >= previousScroll+100) {
            $('.navbar').addClass("navbar-hide");
            previousScroll = scroll;

        }else if (scroll+100 < previousScroll) {
            $('.navbar').removeClass("navbar-hide");
            previousScroll = scroll;
        }
    
    });
    
})(jQuery);

For navbar refer to here.

Comments: 0

Bootstrap For Beginners - Part Two (Bootstrap Containers)

Jul 26, 2020 | 741 views

#Bootstrap


Introduction
 
I have started an article series on Bootstrap. Read the first part here,
In this article we will learn about Containers and then we will understand about Bootstrap Container classes by creating examples. So by using this we can easily create interactive, responsive website layouts.
 
Containers: In Bootstrap we can contain elements to wrap site contents.
 
There are two Bootstrap Container classes 
  1. The .container class used to provide a responsive fixed width container.
  2. The .container-fluid class used to provide a full width container.
We have to note that we cannot put a container inside another container since it is not nestable.

Example 1: Using .container class(responsive fixed width container)
 
In this example we will create a simple Bootstrap page. Using ".container" class we will create fixed width container that is responsive for different devices. In this we will write some text. We will have some space on left and right side of page by writing the following code. 

Keep going!

Comments: 0