Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by David Meador
Page 10 of 12
Activate the content as a Bootstrap modal
If you want to set content as a Bootstrap modal, then use the .modal(options) method.On button click, the modal generates as in the following script.$(document).ready(function(){ $("#button1").click(function(){ $("#newModal1").modal({backdrop: true}); }); });Above, I have set options as “backdrop:true”. Another option, we can set is “backdrop: true” −backdrop: true = Clicking outside the modal, close it.backdrop: false = Clicking outside the modal, won’t close it.You can try to run the following code to implement the modal(“options”) class −Example Bootstrap Example ...
Read MoreBootstrap 4 Button .btn-outline-info class
To set an outline on a button that indicates information, you need to use the btn-outline-info class in Bootstrap.Include the button element and set the btn-outline-info class − More Info You can try to run the following code to implement the btn-outline-info class −Example Bootstrap Example Event The following are the details: Event Timings 1PM TO 4PM Venue: 21 KH, HG Lane, Alabama For more information about the event: More Info
Read MoreAlign flex items in the center on different screen sizes in Bootstrap
To align items in the center on different screen sizes, use the justify-content-*-center class.The aligned flex items would be like the following for small screen size − GOLF CRICKET SQUASH The aligned flex items would be like the following for medium screen size − GOLF CRICKET SQUASH The aligned flex items would be like the following for large screen size − GOLF CRICKET SQUASH Let us see how to implement the justify-content-*-center −Example Bootstrap Example Sports Centered on small screen GOLF CRICKET SQUASH Centered on medium screen GOLF CRICKET SQUASH Centered on large screen GOLF CRICKET SQUASH
Read MoreBootstrap 4 .d-*-flex class
Use the .d-*-flex class in Bootstrap to set a flexbox container on a screen size as shown below −d-flex d-sm-flex d-md-flex d-lg-flexAbove the flex is set for different screen sizes, for example,d-sm-flex = Flex for Small Screen Sized-md-flex = Flex for Medium Screen Sized-lg-flex = Flex for Large Screen Sized-xl-flex = Flex for Extra Large Screen SizeLet us see an example of the class −Example Bootstrap Example Understanding Flex d-flex Small Screen Size Medium Screen Size Large Screen Size Extra Large Screen Size
Read MoreAdd a light grey background color to the Bootstrap 4 card
To add a light grey background color to a card in Bootstrap, use the bg-light contextual class with the card class.To set light grey background, add it to the class − Reduce size of images You can try to run the following code to add ligh grey background color to a card in Bootstrap 4 −Example Bootstrap Example Optimization Reduce size of images Clear Cache Use CDN
Read MoreAlign a flex item at the baseline in Bootstrap 4
To align a flex item at the baseline in Bootstrap 4, use the .align-self-baseline class.Set the flex item at the baseline as shown below − A-one B-one C-one D-one You can try to run the following code to implement the align-self-baseline class in Bootstrap 4 −Example Bootstrap Example Align Specific Flex Item at the baseline A-one B-one C-one D-one
Read MoreBootstrap 4 .flex-nowrap class
Avoid wrapping flex items in Bootstrap 4, using the .flex-nowrap class.Below you can see the flex items aren’t wrapping after the “Eight” flex-item −The flex is set in the div class as if we add any other class in −The following is an example to implement flex-nowrap class to avoid wrapping of flex items −Example Bootstrap Example FLEX WRAP AND NOWRAP Flex items will wrap One Two Three Four Five Six Seven Eight Nine Flex items won't wrap One Two Three Four Five Six Seven Eight Nine
Read MoreSet a blue border to an element in Bootstrap
Use the border-primary class to set a blue border to an element.For a blue border, add the class, as if you add it for or any other element − Let us see an example to set a blue border −Example Bootstrap Example .demo { width: 350px; height: 170px; margin: 10px; } Demo Heading This rectangle has blue border
Read MoreAvoid wrapping flex-items in Bootstrap
Use the flex-nowrap class in Bootstrap 4 to avoid wrapping the flex items.Here you can see the difference between wrap and nowrap −Above the flex-items are not wrapped. This is achieved using the flex-nowrap class in Bootstrap 4 − One Two Three Four Five Six Seven Eight Nine The following is an example to avoid wrapping flex items −Example Bootstrap Example FLEX WRAP AND NOWRAP Flex items will wrap One Two Three Four Five Six Seven Eight Nine Flex items won't wrap One Two Three Four Five Six Seven Eight Nine
Read MoreBootstrap hidden.bs.tooltip event
The hidden.bs.tooltip event in Bootstrap fires when the tooltip is hidden −$("[data-toggle='tooltip']").on('hidden.bs.tooltip', function(){ alert('Tooltip is completely hidden now.'); });The data-toggle attribute is set before as shown below − Timings You can try to run the following code to implement the hidden.bs.tooltip event −Example Bootstrap Example Event Here tooltip will be displayed using the "Show" buttpn and can be hidden using the "Hide" button. Timings ...
Read More