Javascript required
Skip to content Skip to sidebar Skip to footer

How to Fixed Background color of a Span Even if I Reload the Page Again and Again in Jquery

Changing Bootstrap iii modal size properties

In gild to increment or subtract the modal window height and width backdrop of Bootstrap, you need to get the modal related classes and use desired values either in the <style> section or in your external CSS file.

Modify width demo Summit & Width instance Bootstrap 4 Modal

In either case, you have to utilise it after the reference of Bootstrap CSS file. In this tutorial, I will show you how you lot may change the width and height of the modal window.

A demo of changing the width of modal window

For this demo, the .modal-dialog class which is the congenital-in class of Bootstrap framework for the modal window is used in the <style> tag.

In that location, I simply specified the width of 360px that volition override the default value. Besides, I have also changed the default header properties to change the look:

bootstrap modal custom size

Come across online demo and code

The CSS used in demo:

The markup:

A demo of customizing top and width of modal window

In this demo, the meridian of the modal window is also changed along with the width. For that, the .modal-content class is used where I defined the height in percentage.

bootstrap modal height wisth

Encounter online demo and lawmaking

The CSS:

The markup is almost the same as in above example. Get the complete code from the demo folio.

Modify Bootstrap modal summit and width with min/max icons

In this example, the jQuery code is used for creating a modal with min/max options. As minimize icon is clicked, the modal will resize towards the left bottom.

Along with this, the modal top and width properties are as well changed than default. This is again washed past using the .modal-dialog class where width and height of the overall modal are set.

Besides, the .modal-content class is also used for setting the content surface area. Have a wait at the demo and code:

height width modal

See online demo and code

You lot will demand to adjust height property in .modal-content class as per the content in the modal.

How to ready this modal for your website?

In social club to setup this modal with modified height and width, follow these steps.

Step ane:

Place the dependency file in the <head> section of the web page:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/three.3.5/js/bootstrap.min.js"></script>

<!– font Awesome 4.v.0 –>
<link href="css/modal-minimize-and-maximize/font-awesome.css" rel="stylesheet" type="text/css" />

Pace 2:

The CSS for this demo:

Step 3:

The HTML

Step 4:

Finally, place this jQuery lawmaking above the </body> tag:

Learn more nigh this plug-in with other demos in its tutorial by post-obit this link: Minimize/maximize Bootstrap modal.

So, even if you are using a third party modal that is based on the Bootstrap framework, you may notwithstanding change the size of modals by overriding the properties mentioned in this tutorial.

This div superlative required for enabling the sticky sidebar

mccollhinesself.blogspot.com

Source: https://www.jquery-az.com/how-to-increasedecrease-bootstrap-modal-width-and-height/