<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>johna's blog</title>
<link>https://johna.compoutpost.com/</link>
<description>...mostly about web development and programming, with a little bit of anything else related to the Internet, computers and technology.</description>
<item>
<title>How I use the new Bootstrap Icons web font</title>
<link>https://johna.compoutpost.com/blog/1275/how-i-use-the-new-bootstrap-icons-web-font/</link>
<description>I love Bootstrap Icons. It has a large selection of quality icons and it's open source so can be used for free (subject to license terms and conditions).&lt;br&gt;&lt;br&gt;The simple way to use the icons on your website is to use the web font, but that means you are including all 1,500 plus icons (as of v1.7), albeit the file is a reasonable 120kb.&lt;br&gt;&lt;br&gt;But using a free online tool, you can create your own web font with just the icons you need.&lt;br&gt;&lt;br&gt;Here's how I use Bootstrap Icons...&lt;br&gt;&lt;br&gt;&lt;h2&gt;Download the icons&lt;/h2&gt;Go to the &lt;a href=&quot;https://github.com/twbs/icons/releases/latest/&quot;&gt;Bootstrap Icons download page&lt;/a&gt; on Github and download the bootstrap-icons-x.zip ZIP file.&lt;br&gt;&lt;br&gt;&lt;h2&gt;Choose which icons you want to include&lt;/h2&gt;Unzip and open the file. The icons are the SVG files in the root of the ZIP file.&lt;br&gt;&lt;br&gt;You may find it easier to create a temporary new folder to store the icons you want in.&lt;br&gt;&lt;br&gt;&lt;h2&gt;Make your own web font&lt;/h2&gt;I use the IcoMoon app to easily create a custom web font.&lt;br&gt;&lt;br&gt;Head on over to &lt;a href=&quot;https://icomoon.io/app&quot;&gt;icomoon.io/app&lt;/a&gt;.&lt;br&gt;&lt;br&gt;Press &lt;em&gt;Import Icons&lt;/em&gt; (near top left of page) and select all of the icon SVG files that you want in your font.&lt;br&gt;&lt;br&gt;You can either add files one at a time or you can select multiple files at once.&lt;br&gt;&lt;br&gt;Once you proceed, your selected icons will appear as &quot;Untitled Set&quot;. You still need to highlight each of your icons to select them so that they get included in your custom web font. You can select one at a time or multiple select or select all.&lt;br&gt;&lt;br&gt;Next step is to press &lt;em&gt;Generate Font&lt;/em&gt; (bottom right of page). This will show details of your new font and expose a &lt;em&gt;Download&lt;/em&gt; button so you can download a ZIP file containing what you need.&lt;br&gt;&lt;br&gt;The ZIP file has &lt;em&gt;style.css&lt;/em&gt; which you will need to include or better still, add to your HTML template or existing style sheet.&lt;br&gt;&lt;br&gt;There is also a &lt;em&gt;fonts&lt;/em&gt; folder which you will need to copy to your website as it contains the actual web font.&lt;br&gt;&lt;br&gt;Lastly, there is &lt;em&gt;demo.html&lt;/em&gt; which contains examples of how to include your chosen icons in your HTML.&lt;br&gt;&lt;br&gt;The icon classes are named &lt;em&gt;icon-&lt;/em&gt; and then the file name without extension. So you would typically use as follows:&lt;br&gt;&lt;pre&gt;&lt;span class=&quot;icon-arrow-down-right-circle&quot;&gt;&lt;/span&gt;&lt;/pre&gt;&lt;h2&gt;Accessibility&lt;/h2&gt;If your icon is purely decorative, then hide it from screen readers:&lt;pre&gt;&amp;lt;span class=&quot;icon-arrow-right-circle&quot; aria-hidden=&quot;true&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/pre&gt;If your icon is semantic, then you will need to provide alternative text for screen readers. This example is based on what &lt;a href=&quot;https://fontawesome.com/v5.15/how-to-use/on-the-web/other-topics/accessibility&quot;&gt;font awesome&lt;/a&gt; recommends:&lt;pre&gt;&amp;lt;span aria-hidden=&quot;true&quot; class=&quot;icon-bluetooth&quot; title=&quot;Bluetooth&quot;&amp;gt;&amp;lt;/span&amp;gt;
&amp;lt;span class=&quot;sr-only&quot;&amp;gt;Bluetooth&amp;lt;/span&amp;gt;
&amp;lt;span&amp;gt;enabled&amp;lt;/span&amp;gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;/blog/uploads/img1275_icomoon-io.JPG&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;/blog/uploads/img1275_icomoon-io.JPG&quot; class=&quot;img-fluid&quot; /&gt;&lt;/a&gt;</description>
<comments>https://johna.compoutpost.com/blog/1275/how-i-use-the-new-bootstrap-icons-web-font/#comments</comments>
<pubDate>2022-01-07T12:00:00+10:00</pubDate>
<category>Bootstrap</category>
<image>https://johna.compoutpost.com/blog/uploads/img1275_icomoon-io.JPG</image>
<guid>https://johna.compoutpost.com/blog/1275</guid>
</item>
<item>
<title>What's new in Bootstrap v5</title>
<link>https://johna.compoutpost.com/blog/1191/what-s-new-in-bootstrap-v5/</link>
<description>&lt;img alt=&quot;&quot; src=&quot;/blog/uploads/img1191_bootstrap-v5.png&quot; class=&quot;img-fluid&quot; /&gt;&lt;br&gt;&lt;br&gt;There are many changes in &lt;a href=&quot;https://getbootstrap.com/&quot; target=&quot;_blank&quot;&gt;Bootstrap v5&lt;/a&gt;, but these are some of the stand-out changes I noticed when updating a website to v5.&lt;br&gt;&lt;br&gt;One of the first changes I noticed was to do with classes with &quot;-left&quot; and &quot;-right&quot; or &quot;l&quot; and &quot;r&quot;. Because v5 now supports RTL (right-to-left) these have been changed to &quot;-start&quot; and &quot;-end&quot; or &quot;s&quot; and &quot;e&quot; for classes such as text-align, margin, padding, border, etc.&lt;br&gt;&lt;br&gt;Another noticeable change is that data attributes now use a namespace. For dropdowns, collapses, modals, etc you now use &quot;data-bs-*&quot; instead of &quot;data-*&quot;.&lt;br&gt;&lt;br&gt;jQuery is no longer required so if you need it for other functionality you can include it yourself.&lt;br&gt;&lt;br&gt;&lt;b&gt;Forms&lt;/b&gt;&lt;br&gt;&lt;br&gt;There are several important changes in class names for forms.&lt;br&gt;&lt;br&gt;Select boxes now use the class &quot;form-select&quot; instead of &quot;form-control&quot;.&lt;br&gt;&lt;br&gt;For layout there is no longer a &quot;form-group&quot; class and all layout is now done with other generic Bootstrap classes such as margin and grid.&lt;br&gt;&lt;br&gt;There is an attractive new form style called &lt;a href=&quot;https://getbootstrap.com/docs/5.0/forms/floating-labels/&quot; target=&quot;_blank&quot;&gt;floating labels&lt;/a&gt; where the label and form control is styled as one single bordered element.&lt;br&gt;&lt;br&gt;&lt;img alt=&quot;&quot; src=&quot;/blog/uploads/img1191_floating-labels.png&quot; class=&quot;img-fluid&quot; /&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Modals&lt;/b&gt;&lt;br&gt;&lt;br&gt;One nice feature of v5 modals is when you set the background option to &quot;static&quot; (so you can't click outside the modal to close it) if the users clicks outside of the modal it pulsates in size to remind the user that it is open and needs to be actioned before clicking away.&lt;br&gt;&lt;br&gt;&lt;b&gt;Helpers and Utilities&lt;/b&gt;&lt;br&gt;&lt;br&gt;The screen-reader &quot;sr-only&quot; class is now named &lt;a href=&quot;https://getbootstrap.com/docs/5.0/helpers/visually-hidden/&quot; target=&quot;_blank&quot;&gt;&quot;visually-hidden&quot;&lt;/a&gt; and there's a new option to make a hidden element visible when focused.&lt;br&gt;&lt;br&gt;The old &quot;embed&quot; classes are now replaced by &lt;a href=&quot;https://getbootstrap.com/docs/5.0/helpers/ratio/&quot; target=&quot;_blank&quot;&gt;&quot;ratio&quot;&lt;/a&gt; classes.&lt;br&gt;&lt;br&gt;There are new &lt;a href=&quot;https://getbootstrap.com/docs/5.0/utilities/interactions/&quot; target=&quot;_blank&quot;&gt;interaction&lt;/a&gt; classes for handling copying content and mouse pointers.</description>
<comments>https://johna.compoutpost.com/blog/1191/what-s-new-in-bootstrap-v5/#comments</comments>
<pubDate>2020-12-22T12:00:00+10:00</pubDate>
<category>Bootstrap</category>
<image>https://johna.compoutpost.com/blog/uploads/img1191_bootstrap-v5.png</image>
<guid>https://johna.compoutpost.com/blog/1191</guid>
</item>
<item>
<title>How to use the new Bootstrap Icons v1.2 web font</title>
<link>https://johna.compoutpost.com/blog/1189/how-to-use-the-new-bootstrap-icons-v1-2-web-font/</link>
<description>&lt;img alt=&quot;&quot; src=&quot;/blog/thumb/img1189_bootstrap-icons_md.jpg&quot; class=&quot;float-right&quot; /&gt;With the release of Bootstrap Icons v1.2, there is now an easy-to-use web font.&lt;br&gt;&lt;br&gt;Here's how you can use the new web font in your web pages.&lt;br&gt;&lt;br&gt;At this stage I am not aware of a CDN (content delivery network) that hosts the Bootstrap Icons font files, so you will need to install the files on your own web server. The files are only about 229KB.&lt;br&gt;&lt;br&gt;&lt;div class=&quot;alert alert-info&quot;&gt;&lt;strong&gt;Update:&lt;/strong&gt; As of v1.3 there is now a CDN.&lt;br&gt;&lt;br&gt;Steps 1 to 3 can be replaced by the following if you wish to use the CDN instead of hosting the font files yourself.&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;link href=&quot;https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css&quot; rel=&quot;stylesheet&quot;&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;b&gt;Step 1 - Download the Bootstrap Icons files&lt;/b&gt;&lt;br&gt;&lt;br&gt;Go to &lt;a href=&quot;https://icons.getbootstrap.com/&quot; target=&quot;_blank&quot;&gt;icons.getbootstrap.com&lt;/a&gt; and download the latest release. There is a download button at the top-right corner of the page.&lt;br&gt;&lt;br&gt;&lt;b&gt;Step 2 - Install the Bootstrap Icons files&lt;/b&gt;&lt;br&gt;&lt;br&gt;To use the web font on your web site you will need to extract a few files from the ZIP file.&lt;br&gt;&lt;br&gt;From the &lt;em&gt;fonts&lt;/em&gt; folder you will need &lt;em&gt;bootstrap-icons.css&lt;/em&gt; and the &lt;em&gt;fonts&lt;/em&gt; folder (the one inside the first &lt;em&gt;fonts&lt;/em&gt; folder) with the &lt;em&gt;bootstrap-icons.woff&lt;/em&gt; and &lt;em&gt;bootstrap-icons.woff2&lt;/em&gt; files.&lt;br&gt;&lt;br&gt;Copy the CSS file and fonts folder to your website. You can copy the files to your web root folder but typically you would copy them to a folder that contains your other CSS files.&lt;br&gt;&lt;br&gt;&lt;b&gt;Step 3 - Include the Bootstrap Icons CSS file in your web pages&lt;/b&gt;&lt;br&gt;&lt;br&gt;To be able to use the fonts in your web pages you will need to include the bootstrap-icons CSS file in your HEAD section of your HTML. How this is done will vary on the type of website. If you have simple HTML pages then you would need to add this to each page where you want to use the web font. If you are using a content management system like WordPress then this can be done in a template. If you are not sure use Google to search for how to add a CSS file to your CMS.&lt;br&gt;&lt;br&gt;To include the CSS file you would add something like this:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;link href=&quot;bootstrap-icons.css&quot; rel=&quot;stylesheet&quot;&amp;gt;&lt;/pre&gt;(CSS file is in same folder as the HTML document)&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;link href=&quot;/bootstrap-icons.css&quot; rel=&quot;stylesheet&quot;&amp;gt;&lt;/pre&gt;(CSS file is in your web root folder)&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;link href=&quot;/css/bootstrap-icons.css&quot; rel=&quot;stylesheet&quot;&amp;gt;&lt;/pre&gt;(CSS file is in your CSS folder)&lt;br&gt;&lt;br&gt;&lt;b&gt;Step 4 - Using the Bootstrap Icons web font&lt;/b&gt;&lt;br&gt;&lt;br&gt;To include one of the icons you simply add the web font code that you can find on the &lt;a href=&quot;https://icons.getbootstrap.com/&quot; target=&quot;_blank&quot;&gt;Bootstrap Icons website&lt;/a&gt;.&lt;br&gt;&lt;br&gt;For example:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;i class=&quot;bi-alarm&quot;&amp;gt;&amp;lt;/i&amp;gt;&lt;/pre&gt;&lt;br&gt;Each icon has it's own class (eg. bi-alarm), and you can find these by clicking an icon on the &lt;a href=&quot;https://icons.getbootstrap.com/&quot; target=&quot;_blank&quot;&gt;Bootstrap Icons website&lt;/a&gt;.&lt;br&gt;&lt;br&gt;&lt;b&gt;Full example:&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;!doctype html&amp;gt;
&amp;lt;html lang=&quot;en&quot;&amp;gt;
&amp;lt;head&amp;gt;
	&amp;lt;meta charset=&quot;utf-8&quot;&amp;gt;
	&amp;lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&amp;gt;
	&amp;lt;link href=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot; integrity=&quot;sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1&quot; crossorigin=&quot;anonymous&quot;&amp;gt;
	&amp;lt;link href=&quot;bootstrap-icons.css&quot; rel=&quot;stylesheet&quot;&amp;gt;
	&amp;lt;title&amp;gt;Hello, world!&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
	&amp;lt;div class=&quot;container&quot;&amp;gt;
		&amp;lt;h1&amp;gt;Bootstrap Icons v1.2 Example&amp;lt;/h1&amp;gt;
		&amp;lt;p&amp;gt;
			&amp;lt;i class=&quot;bi-alarm&quot;&amp;gt;&amp;lt;/i&amp;gt;
		&amp;lt;/p&amp;gt;
	&amp;lt;/div&amp;gt;
	&amp;lt;script src=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js&quot; integrity=&quot;sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW&quot; crossorigin=&quot;anonymous&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;</description>
<comments>https://johna.compoutpost.com/blog/1189/how-to-use-the-new-bootstrap-icons-v1-2-web-font/#comments</comments>
<pubDate>2020-12-12T12:00:00+10:00</pubDate>
<category>Bootstrap</category>
<image>https://johna.compoutpost.com/blog/uploads/img1189_bootstrap-icons.jpg</image>
<guid>https://johna.compoutpost.com/blog/1189</guid>
</item>
<item>
<title>Bootstrap Icons in Alpha</title>
<link>https://johna.compoutpost.com/blog/1122/bootstrap-icons-in-alpha/</link>
<description>&lt;img alt=&quot;Bootstrap Icons&quot; src=&quot;/blog/uploads/img1122_bootstrap-icons.jpg&quot; class=&quot;img-fluid&quot; /&gt;&lt;br&gt;&lt;br&gt;The Bootstrap team have introduced their own open-source icon set.&lt;br&gt;&lt;br&gt;Back in the old v3.x days, Bootstrap was packaged with Glyphicons but no icon set came with v4.x so many people switched to one of the many open-source icon sets. I often used &lt;a href=&quot;https://useiconic.com/open&quot; target=&quot;_blank&quot;&gt;Open Iconic&lt;/a&gt;.&lt;br&gt;&lt;br&gt;&lt;a href=&quot;https://icons.getbootstrap.com/&quot; target=&quot;_blank&quot;&gt;Bootstrap Icons&lt;/a&gt; is a separate project to Bootstrap and can be used with or without it.&lt;br&gt;&lt;br&gt;The set comprises 213 icons. Some of the icons have an outlined and filled version.&lt;br&gt;&lt;br&gt;The set has icons for most common needs, but there are a couple of surprise omissions. There are no icons for like or dislike, usually a thumbs up or down in other sets, and nothing I could find suitable for follow or unfollow.&lt;br&gt;&lt;br&gt;You also won't find any of the social media brands represented in the set, although I know these are legally protected so are probably not appropriate in an icon set anyway. However, the set does contain Bootstrap icons -- not sure how useful these will be to most people.&lt;br&gt;&lt;br&gt;The set is provided in SVG format and will scale proportionally with the selected font size.&lt;br&gt;&lt;br&gt;The Bootstrap team have left the implementation up to you.&lt;br&gt;&lt;br&gt;You can embed icons within your HTML, reference the individual SVGs like normal images, or use the SVG within your CSS.&lt;br&gt;&lt;br&gt;If you are used to more simpler methods of including icons, you may be a little disappointed.&lt;br&gt;&lt;br&gt;I wouldn't be surprised to see the icon set as an installation option when including Bootstrap v5.x when it rolls out in the near future.&lt;br&gt;&lt;br&gt;Leave a comment and let me know what you think of the new icon set, whether you will use it, and what extra icons or changes you would like to see.&lt;br&gt;&lt;br&gt;&lt;a href=&quot;https://icons.getbootstrap.com/&quot; target=&quot;_blank&quot; class=&quot;btn btn-primary&quot;&gt;Visit site&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;strong&gt;Update:&lt;/strong&gt; After only a few weeks the Bootstrap team released Bootstrap Icons Alpha 2.&lt;br&gt;&lt;br&gt;They added 20 new icons including some eye icons which are suitable if you need icons for watch and unwatch.&lt;br&gt;&lt;br&gt;Some issues were also fixed and some of the icons improved.&lt;br&gt;&lt;br&gt;&lt;b&gt;Update: 20 March 2020&lt;/b&gt;&lt;br&gt;&lt;br&gt;Alpha 3 is now out with some major improvements to Icons and hundreds of new icons added.&lt;br&gt;&lt;br&gt;Still no like and unlike icons though!&lt;br&gt;&lt;br&gt;&lt;a href=&quot;/blog/uploads/img1122_bootstrap-icons-alpha-3.png&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Bootstrap Icons Alpha 3&quot; src=&quot;/blog/thumb/img1122_bootstrap-icons-alpha-3_lg.png&quot; class=&quot;img-fluid&quot; /&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Update: 22 May 2020&lt;/b&gt;&lt;br&gt;&lt;br&gt;Alpha 4 has been released. Like and unlike are here! There are also new e-commerce icons, calendar icons and arrows.&lt;br&gt;&lt;br&gt;There are now around 700 icons including thumbs up/down.&lt;br&gt;&lt;br&gt;&lt;a href=&quot;/blog/uploads/img1122_bootstrap-icons-alpha4-all.png&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Bootstrap Icons Alpha 4&quot; src=&quot;/blog/uploads/img1122_bootstrap-icons-alpha4-all.png&quot; class=&quot;img-fluid&quot; /&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Update: 29 June 2020&lt;/b&gt;&lt;br&gt;&lt;br&gt;Alpha 5 is out now and will be the last Alpha release. There are now over 1,000 icons.&lt;br&gt;&lt;br&gt;Next release will be v1 stable.&lt;br&gt;&lt;br&gt;&lt;a href=&quot;/blog/uploads/img1122_bootstrap-icons-alpha5-all.png&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;bootstrap-icons-alpha5-all.png&quot; src=&quot;/blog/uploads/img1122_bootstrap-icons-alpha5-all.png&quot; class=&quot;img-fluid&quot; /&gt;&lt;/a&gt;</description>
<comments>https://johna.compoutpost.com/blog/1122/bootstrap-icons-in-alpha/#comments</comments>
<pubDate>2019-12-09T12:00:00+10:00</pubDate>
<category>Bootstrap</category>
<image>https://johna.compoutpost.com/blog/uploads/img1122_bootstrap-icons.jpg</image>
<guid>https://johna.compoutpost.com/blog/1122</guid>
</item>
<item>
<title>What's new in Bootstrap 4.4.0 and 4.4.1?</title>
<link>https://johna.compoutpost.com/blog/1116/what-s-new-in-bootstrap-4-4-0/</link>
<description>&lt;img alt=&quot;Whats new in Bootstrap 4.4.0&quot; src=&quot;/blog/uploads/img1116_bootstrap.jpg&quot; class=&quot;img-fluid&quot; /&gt;&lt;br&gt;&lt;br&gt;There are two major improvements in Bootstrap 4.4.0, released 26 November 2019.&lt;br&gt;&lt;br&gt;&lt;h2&gt;Responsive containers&lt;/h2&gt;If, like me, you've been annoyed with the fixed width of Bootstrap's &lt;strong&gt;container&lt;/strong&gt; class below the &lt;strong&gt;xl&lt;/strong&gt; breakpoint, then you will be pleased with the enw responsive containers.&lt;br&gt;&lt;br&gt;If you use &lt;strong&gt;container-{breakpoint}&lt;/strong&gt; instead of &lt;strong&gt;container&lt;/strong&gt;, the container will span 100% width up to the specified breakpoint.&lt;br&gt;&lt;br&gt;&lt;a href=&quot;https://getbootstrap.com/docs/4.4/layout/overview/#containers&quot; target=&quot;_blank&quot;&gt;Bootstrap documentation&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;https://getbootstrap.com/docs/4.4/examples/grid/#containers&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;h2&gt;Responsive &lt;em&gt;.row-cols&lt;/em&gt; classes&lt;/h2&gt;There are now shortcut &lt;strong&gt;row-cols-*&lt;/strong&gt; classes to specify how many columns should be shown per row.&lt;br&gt;&lt;br&gt;Looking at the following example, the row will contain two equal width columns at all breakpoints.&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;div class=&quot;container&quot;&amp;gt;&lt;br&gt;  &amp;lt;div class=&quot;row row-cols-2&quot;&amp;gt;&lt;br&gt;    &amp;lt;div class=&quot;col&quot;&amp;gt;Column&amp;lt;/div&amp;gt;&lt;br&gt;    &amp;lt;div class=&quot;col&quot;&amp;gt;Column&amp;lt;/div&amp;gt;&lt;br&gt;    &amp;lt;div class=&quot;col&quot;&amp;gt;Column&amp;lt;/div&amp;gt;&lt;br&gt;    &amp;lt;div class=&quot;col&quot;&amp;gt;Column&amp;lt;/div&amp;gt;&lt;br&gt;  &amp;lt;/div&amp;gt;&lt;br&gt;&amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;br&gt;You could specify a different number of columns per row at all breakpoints by changing to &lt;strong&gt;row-cols-*&lt;/strong&gt; or specify columns for various breakpoints by using &lt;strong&gt;row-cols-{breakpoint}-*&lt;/strong&gt;, for example:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;div class=&quot;container&quot;&amp;gt;&lt;br&gt;  &amp;lt;div class=&quot;row row-cols-1 row-cols-sm-2 row-cols-md-4&quot;&amp;gt;&lt;br&gt;    &amp;lt;div class=&quot;col&quot;&amp;gt;Column&amp;lt;/div&amp;gt;&lt;br&gt;    &amp;lt;div class=&quot;col&quot;&amp;gt;Column&amp;lt;/div&amp;gt;&lt;br&gt;    &amp;lt;div class=&quot;col&quot;&amp;gt;Column&amp;lt;/div&amp;gt;&lt;br&gt;    &amp;lt;div class=&quot;col&quot;&amp;gt;Column&amp;lt;/div&amp;gt;&lt;br&gt;  &amp;lt;/div&amp;gt;&lt;br&gt;&amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;br&gt;&lt;a href=&quot;https://getbootstrap.com/docs/4.4/layout/grid/#row-columns&quot; target=&quot;_blank&quot;&gt;Bootstrap documentation (Grid)&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;https://getbootstrap.com/docs/4.4/components/card/#grid-cards&quot; target=&quot;_blank&quot;&gt;Bootstrap documentation (Card)&lt;/a&gt;&lt;br&gt;&lt;br&gt;These are the two changes that most people will want to know about, but there has also been other minor behind-the-scenes changes and bug fixes in 4.4.0. Check out the &lt;a href=&quot;https://blog.getbootstrap.com/2019/11/26/bootstrap-4-4-0/&quot; target=&quot;_blank&quot;&gt;Bootstrap blog&lt;/a&gt; for full details.&lt;br&gt;&lt;br&gt;&lt;strong&gt;Update: Just a couple of days later, the Bootstrap team released v4.4.1 as there was an issue when compiling with some Sass compilers.&lt;/strong&gt;</description>
<comments>https://johna.compoutpost.com/blog/1116/what-s-new-in-bootstrap-4-4-0/#comments</comments>
<pubDate>2019-11-27T12:00:00+10:00</pubDate>
<category>Bootstrap</category>
<image>https://johna.compoutpost.com/blog/uploads/img1116_bootstrap.jpg</image>
<guid>https://johna.compoutpost.com/blog/1116</guid>
</item>
<item>
<title>More on Bootstrap 4 modals in ASP.NET Web Forms applications using UpdatePanels</title>
<link>https://johna.compoutpost.com/blog/1007/more-on-bootstrap-4-modals-in-asp-net-web-forms-applications-using-updatepanels/</link>
<description>&lt;a href=&quot;/blog/uploads/img1007_asp-net-bootstrap-4-modal.jpg&quot;&gt;&lt;img alt=&quot;ASP.NET Bootstrap 4 Modal&quot; src=&quot;/blog/uploads/img1007_asp-net-bootstrap-4-modal.jpg&quot; class=&quot;img-fluid&quot; /&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;I've now written a couple of posts on the topic of using Bootstrap modals in ASP.NET Web Forms projects, &lt;a href=/blog/778/bootstrap-modals-inside-updatepanels-in-asp-net-web-forms/&gt;one&lt;/a&gt; on using native Bootstrap modal methods with ClientScript and &lt;a href=/blog/832/asp-net-web-forms-and-bootstrap-3-modals/&gt;another&lt;/a&gt; attempting to control them with server-side code only. Both methods had some issues.&lt;br&gt;&lt;br&gt;In this, my third post, I go over the methods I am using now and the problems I have encountered and overcome.&lt;br&gt;&lt;br&gt;The previous server-side method was ideal, but I couldn't get around some issues, so I now believe the best method is to use the native JavaScript methods to hide and show the modals.&lt;br&gt;&lt;br&gt;Here's some sample code for how I do this now:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;asp:UpdatePanel ID=&quot;UpdatePanel1&quot; runat=&quot;server&quot; UpdateMode=&quot;Conditional&quot;&amp;gt;&lt;br&gt;	&amp;lt;ContentTemplate&amp;gt;&lt;br&gt;		&amp;lt;asp:Button ID=&quot;Button1&quot; runat=&quot;server&quot; CssClass=&quot;btn btn-primary&quot; OnClick=&quot;Button1_Click&quot; Text=&quot;Show Modal&quot; /&amp;gt;&lt;br&gt;	&amp;lt;/ContentTemplate&amp;gt;&lt;br&gt;&amp;lt;/asp:UpdatePanel&amp;gt;&lt;br&gt;&lt;br&gt;&amp;lt;asp:Panel ID=&quot;Modal1&quot; runat=&quot;server&quot; CssClass=&quot;modal&quot; data-backdrop=&quot;static&quot; tabindex=&quot;-1&quot; role=&quot;dialog&quot;&amp;gt;&lt;br&gt;	&amp;lt;div class=&quot;modal-dialog&quot; role=&quot;document&quot;&amp;gt;&lt;br&gt;		&amp;lt;div class=&quot;modal-content&quot;&amp;gt;&lt;br&gt;			&amp;lt;div class=&quot;modal-header&quot;&amp;gt;&lt;br&gt;				&amp;lt;h5 class=&quot;modal-title&quot;&amp;gt;Sample Modal&amp;lt;/h5&amp;gt;&lt;br&gt;			&amp;lt;/div&amp;gt;&lt;br&gt;			&amp;lt;div class=&quot;modal-body&quot;&amp;gt;&lt;br&gt;				Sample modal content.&lt;br&gt;			&amp;lt;/div&amp;gt;&lt;br&gt;			&amp;lt;div class=&quot;modal-footer&quot;&amp;gt;&lt;br&gt;				&amp;lt;asp:UpdatePanel ID=&quot;UpdatePanel2&quot; runat=&quot;server&quot; UpdateMode=&quot;Conditional&quot;&amp;gt;&lt;br&gt;					&amp;lt;ContentTemplate&amp;gt;&lt;br&gt;						&amp;lt;asp:Button ID=&quot;Button2&quot; runat=&quot;server&quot; CssClass=&quot;btn btn-primary&quot; OnClick=&quot;Button2_Click&quot; Text=&quot;Continue&quot; /&amp;gt;&lt;br&gt;					&amp;lt;/ContentTemplate&amp;gt;&lt;br&gt;				&amp;lt;/asp:UpdatePanel&amp;gt;&lt;br&gt;			&amp;lt;/div&amp;gt;&lt;br&gt;		&amp;lt;/div&amp;gt;&lt;br&gt;	&amp;lt;/div&amp;gt;&lt;br&gt;&amp;lt;/asp:Panel&amp;gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;&lt;pre&gt;protected void Button1_Click(object sender, EventArgs e)&lt;br&gt;{&lt;br&gt;	ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType(), &quot;Modal1_show&quot;, &quot;$(function(){$('#&quot; + Modal1.ClientID + &quot;').modal('show');});&quot;, true);&lt;br&gt;}&lt;br&gt;&lt;br&gt;protected void Button2_Click(object sender, EventArgs e)&lt;br&gt;{&lt;br&gt;	ScriptManager.RegisterStartupScript(UpdatePanel2, UpdatePanel2.GetType(), &quot;Modal1_hide&quot;, &quot;$(function(){$('#&quot; + Modal1.ClientID + &quot;').modal('hide');});&quot;, true);&lt;br&gt;}&lt;/pre&gt;&lt;br&gt;&lt;br&gt;It is important that any controls inside the modal that cause a postback are contained in an UpdatePanel &lt;b&gt;inside&lt;/b&gt; the modal. Remember that UpdatePanel contents are recreated on partial postback, and if this happens the modal gets destroyed and can no longer be controlled so you must not update the UpdatePanel that wraps the modal itself. This will leave the page with no modal but still with the grey backdrop making the page unusable.&lt;br&gt;&lt;br&gt;In my example, I have an UpdatePanel wrapped around Button2 which is used to close the modal.&lt;br&gt;&lt;br&gt;What if you want some other part of the page to update based on an action inside the modal or when the modal is closed? You need to have an UpdatePanel wrapping the other content you want to update and in your server-side code you must manually force an update to both (or more) UpdatePanels.&lt;br&gt;&lt;br&gt;Let's change the above code so that when the modal is clicked it updates a Label control in another UpdatePanel:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;asp:UpdatePanel ID=&quot;UpdatePanel3&quot; runat=&quot;server&quot; UpdateMode=&quot;Conditional&quot;&amp;gt;&lt;br&gt;	&amp;lt;ContentTemplate&amp;gt;&lt;br&gt;		&amp;lt;div&amp;gt;&lt;br&gt;			&amp;lt;asp:Label ID=&quot;Label1&quot; runat=&quot;server&quot; Text=&quot;&quot;&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;br&gt;		&amp;lt;div&amp;gt;&lt;br&gt;	&amp;lt;/ContentTemplate&amp;gt;&lt;br&gt;&amp;lt;/asp:UpdatePanel&amp;gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;&lt;pre&gt;protected void Button2_Click(object sender, EventArgs e)&lt;br&gt;{&lt;br&gt;	Label1.Text += &quot;Modal closed. &quot;;&lt;br&gt;&lt;br&gt;	ScriptManager.RegisterStartupScript(UpdatePanel2, UpdatePanel2.GetType(), &quot;Modal1_hide&quot;, &quot;$(function(){$('#&quot; + Modal1.ClientID + &quot;').modal('hide');});&quot;, true);&lt;br&gt;&lt;br&gt;	UpdatePanel2.Update();&lt;br&gt;	UpdatePanel3.Update();&lt;br&gt;}&lt;/pre&gt;&lt;br&gt;&lt;br&gt;Note that this applies to both Bootstrap v3.x and v4.x.</description>
<comments>https://johna.compoutpost.com/blog/1007/more-on-bootstrap-4-modals-in-asp-net-web-forms-applications-using-updatepanels/#comments</comments>
<pubDate>2019-04-09T12:00:00+10:00</pubDate>
<category>ASP.NET Web Forms</category>
<category>Bootstrap</category>
<image>https://johna.compoutpost.com/blog/uploads/img1007_asp-net-bootstrap-4-modal.jpg</image>
<guid>https://johna.compoutpost.com/blog/1007</guid>
</item>
<item>
<title>Sample Bootstrap 4 template for a search orientated two row navbar</title>
<link>https://johna.compoutpost.com/blog/1001/sample-bootstrap-4-template-for-a-search-orientated-two-row-navbar/</link>
<description>&lt;img alt=&quot;Sample Bootstrap 4 template for a search orientate&quot; src=&quot;/blog/uploads/img1001_template.jpg&quot; class=&quot;img-fluid&quot; /&gt;&lt;br&gt;&lt;br&gt;This sample lends itself to an ecommerce website.&lt;br&gt;&lt;br&gt;Features:&lt;br&gt;&lt;br&gt;*Search is always visible, even on small screens&lt;br&gt;*Product categories are visible on larger screens but need a click to view on small screens&lt;br&gt;*Shopping cart link is always visible&lt;br&gt;*Phone number is always visible&lt;br&gt;*On small screens just a small logo is visible, but on larger screens the website name is also visible&lt;br&gt;&lt;br&gt;This template uses standard Bootstrap classes wheere possible, but requires a little extra CSS to achieve the end result.&lt;br&gt;&lt;br&gt;&lt;a href=&quot;/blog/uploads/att1001_search-header.html&quot; target=&quot;_blank&quot; class=&quot;btn btn-primary&quot;&gt;Demo&lt;/a&gt;&lt;br&gt;&lt;br&gt;Source code:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;!doctype html&amp;gt;&lt;br&gt;&amp;lt;html lang=&quot;en&quot;&amp;gt;&lt;br&gt;&amp;lt;head&amp;gt;&lt;br&gt;	&amp;lt;meta charset=&quot;utf-8&quot;&amp;gt;&lt;br&gt;	&amp;lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, shrink-to-fit=no&quot;&amp;gt;&lt;br&gt;	&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css&quot; integrity=&quot;sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS&quot; crossorigin=&quot;anonymous&quot;&amp;gt;&lt;br&gt;	&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/open-iconic/1.1.1/font/css/open-iconic-bootstrap.min.css&quot; /&amp;gt;&lt;br&gt;	&amp;lt;title&amp;gt;Hello, world!&amp;lt;/title&amp;gt;&lt;br&gt;	&amp;lt;style type=&quot;text/css&quot;&amp;gt;&lt;br&gt;		#header .row{margin-right:-5px;margin-left:-5px}&lt;br&gt;		#header .col,#header .col-auto{padding-right:5px;padding-left:5px}&lt;br&gt;		#header_top{height:46px}&lt;br&gt;		#header_logo_left{float:left}&lt;br&gt;		#header_logo_right{display:none}&lt;br&gt;		#header_cart{position:relative}&lt;br&gt;		#header_cart_qty{position:absolute;top:0;right:12px;font-size:11px;line-height:14px;background:#212529;border-radius:50%;color:#fff;height:14px;width:14px;text-align:center}&lt;br&gt;&lt;br&gt;		#header_cart a{font-size:1.5rem;text-decoration:none}&lt;br&gt;		#header_cart a .badge{color:#fff}&lt;br&gt;		#header_bottom a{display:block;line-height:36px}&lt;br&gt;		#header_bottom a:hover{text-decoration:none}&lt;br&gt;		#header_nav{clear:both}&lt;br&gt;		#header .collapsing{position:initial;height:initial;overflow:initial;transition:initial}&lt;br&gt;		@media screen and (prefers-reduced-motion:reduce) {&lt;br&gt;		#header .collapsing{transition:initial}&lt;br&gt;		}&lt;br&gt;		@media (min-width: 576px) {&lt;br&gt;		#header .row{margin-right:-15px;margin-left:-15px}&lt;br&gt;		#header .col,#header .col-auto{padding-right:15px;padding-left:15px}&lt;br&gt;		#header_logo_right{float:left;display:block;margin-left:4px}&lt;br&gt;		}&lt;br&gt;&lt;br&gt;		@media (min-width: 992px) {&lt;br&gt;		#header_menu_toggler{display:none!important}&lt;br&gt;		#header_nav a{display:inline-block;margin-right:20px}&lt;br&gt;		#header_nav{clear:none;display:block!important;float:left}&lt;br&gt;		}&lt;br&gt;	&amp;lt;/style&amp;gt;&lt;br&gt;&amp;lt;/head&amp;gt;&lt;br&gt;&amp;lt;body&amp;gt;&lt;br&gt;&lt;br&gt;	&amp;lt;div id=&quot;header&quot; class=&quot;bg-light border-bottom&quot;&amp;gt;&lt;br&gt;		&amp;lt;div class=&quot;container&quot;&amp;gt;&lt;br&gt;			&amp;lt;div id=&quot;header_top&quot; class=&quot;row align-items-center&quot;&amp;gt;&lt;br&gt;				&amp;lt;div class=&quot;col-auto&quot;&amp;gt;&lt;br&gt;					&amp;lt;a href=&quot;#&quot;&amp;gt;&lt;br&gt;						&amp;lt;img id=&quot;header_logo_left&quot; alt=&quot;&quot; src=&quot;https://via.placeholder.com/36x36.png?text=logo&quot; style=&quot;height:36px;width:36px;&quot; /&amp;gt;&lt;br&gt;						&amp;lt;img id=&quot;header_logo_right&quot; alt=&quot;&quot; src=&quot;https://via.placeholder.com/231x36.png?text=brand&quot; style=&quot;height:36px;width:231px;&quot; /&amp;gt;&lt;br&gt;					&amp;lt;/a&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;				&amp;lt;div id=&quot;header_search&quot; class=&quot;col&quot;&amp;gt;&lt;br&gt;					&amp;lt;form action=&quot;/search&quot; method=&quot;get&quot; role=&quot;search&quot;&amp;gt;&lt;br&gt;						&amp;lt;label for=&quot;keywords&quot; class=&quot;sr-only&quot;&amp;gt;search&amp;lt;/label&amp;gt;&lt;br&gt;						&amp;lt;div class=&quot;input-group&quot;&amp;gt;&lt;br&gt;							&amp;lt;input id=&quot;keywords&quot; name=&quot;keywords&quot; type=&quot;text&quot; class=&quot;form-control&quot; placeholder=&quot;search&quot;&amp;gt;&lt;br&gt;							&amp;lt;span class=&quot;input-group-append&quot;&amp;gt;&lt;br&gt;								&amp;lt;button type=&quot;submit&quot; class=&quot;btn btn-dark&quot;&amp;gt;&amp;lt;span class=&quot;oi oi-magnifying-glass&quot; aria-hidden=&quot;true&quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/button&amp;gt;&lt;br&gt;							&amp;lt;/span&amp;gt;&lt;br&gt;						&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;/form&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;				&amp;lt;div id=&quot;header_cart&quot; class=&quot;col-auto&quot;&amp;gt;&lt;br&gt;					&amp;lt;a href=&quot;#&quot; class=&quot;text-danger&quot;&amp;gt;&amp;lt;span class=&quot;oi oi-cart&quot; aria-hidden=&quot;true&quot;&amp;gt;&amp;lt;/span&amp;gt; &amp;lt;span id=&quot;header_cart_qty&quot;&amp;gt;99&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;			&amp;lt;/div&amp;gt;&lt;br&gt;			&amp;lt;nav id=&quot;header_bottom&quot; class=&quot;clearfix&quot;&amp;gt;&lt;br&gt;				&amp;lt;a id=&quot;header_menu_toggler&quot; class=&quot;float-left text-dark&quot; data-toggle=&quot;collapse&quot; href=&quot;#header_nav&quot;&amp;gt;menu &amp;lt;span class=&quot;oi oi-chevron-bottom&quot; aria-hidden=&quot;true&quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br&gt;				&amp;lt;a href=&quot;tel:0000000000&quot; class=&quot;float-right text-dark&quot;&amp;gt;&amp;lt;span class=&quot;icon-phone&quot;&amp;gt;&amp;lt;/span&amp;gt; (000) 000-0000&amp;lt;/a&amp;gt;&lt;br&gt;				&amp;lt;div id=&quot;header_nav&quot; class=&quot;collapse&quot;&amp;gt;&lt;br&gt;					&amp;lt;a href=&quot;#&quot; class=&quot;text-dark&quot;&amp;gt;Menu option A&amp;lt;/a&amp;gt;&lt;br&gt;					&amp;lt;a href=&quot;#&quot; class=&quot;text-dark&quot;&amp;gt;Menu option B&amp;lt;/a&amp;gt;&lt;br&gt;					&amp;lt;a href=&quot;#&quot; class=&quot;text-dark&quot;&amp;gt;Menu option C&amp;lt;/a&amp;gt;&lt;br&gt;					&amp;lt;a href=&quot;#&quot; class=&quot;text-dark&quot;&amp;gt;Menu option D&amp;lt;/a&amp;gt;&lt;br&gt;					&amp;lt;a href=&quot;#&quot; class=&quot;text-dark&quot;&amp;gt;Menu option E&amp;lt;/a&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;			&amp;lt;/nav&amp;gt;&lt;br&gt;		&amp;lt;/div&amp;gt;&lt;br&gt;	&amp;lt;/div&amp;gt;&lt;br&gt;	&amp;lt;div class=&quot;container&quot;&amp;gt;&lt;br&gt;		&amp;lt;h1&amp;gt;Hello, world!&amp;lt;/h1&amp;gt;&lt;br&gt;	&amp;lt;/div&amp;gt;&lt;br&gt;	&amp;lt;script src=&quot;https://code.jquery.com/jquery-3.3.1.slim.min.js&quot; integrity=&quot;sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo&quot; crossorigin=&quot;anonymous&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br&gt;	&amp;lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js&quot; integrity=&quot;sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut&quot; crossorigin=&quot;anonymous&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br&gt;	&amp;lt;script src=&quot;https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js&quot; integrity=&quot;sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k&quot; crossorigin=&quot;anonymous&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br&gt;&amp;lt;/body&amp;gt;&lt;br&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;</description>
<comments>https://johna.compoutpost.com/blog/1001/sample-bootstrap-4-template-for-a-search-orientated-two-row-navbar/#comments</comments>
<pubDate>2019-01-16T12:00:00+10:00</pubDate>
<category>Bootstrap</category>
<image>https://johna.compoutpost.com/blog/uploads/img1001_template.jpg</image>
<guid>https://johna.compoutpost.com/blog/1001</guid>
</item>
<item>
<title>Free Bootstrap 4 Template with Side Navigation</title>
<link>https://johna.compoutpost.com/blog/998/free-bootstrap-4-template-with-side-navigation/</link>
<description>&lt;img alt=&quot;Template screenshots&quot; src=&quot;/blog/uploads/img998_template-sample.jpg&quot; class=&quot;img-fluid&quot; /&gt;&lt;br&gt;&lt;br&gt;I recently needed a simple Bootstrap 4 template with side-navigation.&lt;br&gt;&lt;br&gt;I came up with the following template. The design was inspired by several templates I saw online but I created my own HTML, CSS and JavaScript so as to use as much Bootstrap functionality as possible and keep the template simple and lightweight.&lt;br&gt;&lt;br&gt;You are free to use the template however you like. No license applies and attribution is not required.&lt;br&gt;&lt;br&gt;&lt;a href=&quot;/blog/uploads/att998_demo.html&quot; target=&quot;_blank&quot; class=&quot;btn btn-primary&quot;&gt;Demo&lt;/a&gt;&lt;br&gt;&lt;br&gt;The two column layout uses a positive padding/negative margin trick above Bootstrap's MD breakpoint to achieve equal height columns.&lt;br&gt;&lt;br&gt;At XS widths the menu is hidden and a small JavaScript script (jQuery) is used to hide and show the menu, which is positioned absolutely to take up at minimum the full height and width.&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;!doctype html&amp;gt;&lt;br&gt;&amp;lt;html lang=&quot;en&quot;&amp;gt;&lt;br&gt;&amp;lt;head&amp;gt;&lt;br&gt;	&amp;lt;meta charset=&quot;utf-8&quot;&amp;gt;&lt;br&gt;	&amp;lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, shrink-to-fit=no&quot;&amp;gt;&lt;br&gt;	&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css&quot; integrity=&quot;sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO&quot; crossorigin=&quot;anonymous&quot;&amp;gt;&lt;br&gt;	&amp;lt;title&amp;gt;Hello, world!&amp;lt;/title&amp;gt;&lt;br&gt;	&amp;lt;style type=&quot;text/css&quot;&amp;gt;&lt;br&gt;		body&lt;br&gt;		{&lt;br&gt;			background:#f7f7f7&lt;br&gt;		}&lt;br&gt;&lt;br&gt;		#header&lt;br&gt;		{&lt;br&gt;			background:#fff&lt;br&gt;		}&lt;br&gt;&lt;br&gt;		@media (max-width:767px) {&lt;br&gt;			#nav-outer&lt;br&gt;			{&lt;br&gt;				display:none&lt;br&gt;			}&lt;br&gt;	&lt;br&gt;			#nav-outer.nav-show&lt;br&gt;			{&lt;br&gt;				background:#fff;&lt;br&gt;				display:block;&lt;br&gt;				position:absolute;&lt;br&gt;				top:0;&lt;br&gt;				left:0;&lt;br&gt;				min-height:100%;&lt;br&gt;				width:100%;&lt;br&gt;				padding-top:1rem&lt;br&gt;			}&lt;br&gt;	&lt;br&gt;			#nav&lt;br&gt;			{&lt;br&gt;				width:250px;&lt;br&gt;				margin-left:auto;&lt;br&gt;				margin-right:auto&lt;br&gt;			}&lt;br&gt;	&lt;br&gt;			#article-outer.article-hide&lt;br&gt;			{&lt;br&gt;				display:none&lt;br&gt;			}&lt;br&gt;	&lt;br&gt;			#header&lt;br&gt;			{&lt;br&gt;				border-bottom:1px solid rgba(0,0,0,.125)&lt;br&gt;			}&lt;br&gt;	&lt;br&gt;			.no-gutters-xs&lt;br&gt;			{&lt;br&gt;				margin-left:0;&lt;br&gt;				margin-right:0&lt;br&gt;			}&lt;br&gt;	&lt;br&gt;			.no-gutters-xs &amp;gt; .col,.no-gutters-xs &amp;gt; [class*=col-]&lt;br&gt;			{&lt;br&gt;				padding-left:0;&lt;br&gt;				padding-right:0&lt;br&gt;			}&lt;br&gt;	&lt;br&gt;			#article &amp;gt; .card,#article .row.no-gutters-xs &amp;gt; [class*=col-] .card&lt;br&gt;			{&lt;br&gt;				border-left:0;&lt;br&gt;				border-right:0;&lt;br&gt;				border-radius:0&lt;br&gt;			}&lt;br&gt;		}&lt;br&gt;&lt;br&gt;		@media (min-width:768px) {&lt;br&gt;			#header&lt;br&gt;			{&lt;br&gt;				width:250px;&lt;br&gt;				float:left;&lt;br&gt;				padding-bottom:99999px!important;&lt;br&gt;				margin-bottom:-99999px&lt;br&gt;			}&lt;br&gt;	&lt;br&gt;			#article&lt;br&gt;			{&lt;br&gt;				max-width:1180px;&lt;br&gt;				margin:0 auto&lt;br&gt;			}&lt;br&gt;	&lt;br&gt;			#header&lt;br&gt;			{&lt;br&gt;				padding:0 30px;&lt;br&gt;				border-right:1px solid rgba(0,0,0,.125)&lt;br&gt;			}&lt;br&gt;	&lt;br&gt;			#body&lt;br&gt;			{&lt;br&gt;				overflow:hidden&lt;br&gt;			}&lt;br&gt;	&lt;br&gt;			#article-outer&lt;br&gt;			{&lt;br&gt;				margin-left:250px&lt;br&gt;			}&lt;br&gt;	&lt;br&gt;			#footer&lt;br&gt;			{&lt;br&gt;				max-width:1180px;&lt;br&gt;				margin:0 auto&lt;br&gt;			}&lt;br&gt;		}&lt;br&gt;&lt;br&gt;		h1&lt;br&gt;		{&lt;br&gt;			text-align:center&lt;br&gt;		}&lt;br&gt;&lt;br&gt;		.lead&lt;br&gt;		{&lt;br&gt;			text-align:center&lt;br&gt;		}&lt;br&gt;&lt;br&gt;		#footer-outer&lt;br&gt;		{&lt;br&gt;			background:#efefef&lt;br&gt;		}&lt;br&gt;	&amp;lt;/style&amp;gt;&lt;br&gt;&amp;lt;/head&amp;gt;&lt;br&gt;&amp;lt;body&amp;gt;&lt;br&gt;	&amp;lt;div id=&quot;body&quot;&amp;gt;&lt;br&gt;		&amp;lt;div id=&quot;header&quot;&amp;gt;&lt;br&gt;			&amp;lt;div class=&quot;pl-4 pl-md-0 pt-3 mb-3&quot;&amp;gt;&lt;br&gt;				&amp;lt;div class=&quot;xrow clearfix&quot;&amp;gt;&lt;br&gt;					&amp;lt;div class=&quot;xcol float-left&quot;&amp;gt;&lt;br&gt;						&amp;lt;a href=&quot;#&quot;&amp;gt;&amp;lt;img src=&quot;https://via.placeholder.com/156x40.png?text=Logo&quot; /&amp;gt;&amp;lt;/a&amp;gt;&lt;br&gt;					&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;div class=&quot;xcol xtext-right d-md-none float-right&quot;&amp;gt;&lt;br&gt;						&amp;lt;a id=&quot;nav-show&quot; class=&quot;btn btn-link btn-lg text-dark&quot; data-xxtoggle=&quot;collapse&quot;&amp;gt;&amp;#9776;&amp;lt;/a&amp;gt;&lt;br&gt;					&amp;lt;/div&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;			&amp;lt;/div&amp;gt;&lt;br&gt;			&amp;lt;div id=&quot;nav-outer&quot;&amp;gt;&lt;br&gt;				&amp;lt;div class=&quot;d-md-none text-right&quot;&amp;gt;&lt;br&gt;					&amp;lt;a id=&quot;nav-hide&quot; href=&quot;#&quot; class=&quot;btn btn-link btn-lg text-dark&quot;&amp;gt;&amp;Chi;&amp;lt;/a&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;				&amp;lt;div id=&quot;nav&quot; class=&quot;pb-4&quot;&amp;gt;&lt;br&gt;					&amp;lt;div&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;font-weight-bold btn btn-link text-dark&quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;div&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;font-weight-bold btn btn-link text-dark&quot;&amp;gt;Menu 1&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;div id=&quot;nav-sub&quot; class=&quot;pl-3&quot;&amp;gt;&lt;br&gt;						&amp;lt;div&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;btn btn-link btn-sm text-dark&quot;&amp;gt;Submenu 1&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;div&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;btn btn-link btn-sm&quot;&amp;gt;Submenu 2&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;div&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;btn btn-link btn-sm text-dark&quot;&amp;gt;Submenu 3&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;div&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;btn btn-link btn-sm text-dark&quot;&amp;gt;Submenu 4&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;div&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;btn btn-link btn-sm text-dark&quot;&amp;gt;Submenu 5&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;div&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;font-weight-bold btn btn-link text-dark&quot;&amp;gt;Menu 2&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;div&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;font-weight-bold btn btn-link text-dark&quot;&amp;gt;Menu 3&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;div&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;font-weight-bold btn btn-link text-dark&quot;&amp;gt;Menu 4&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;div&amp;gt;&amp;lt;a href=&quot;#&quot; class=&quot;font-weight-bold btn btn-link text-dark&quot;&amp;gt;Menu 5&amp;lt;/a&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;			&amp;lt;/div&amp;gt;&lt;br&gt;		&amp;lt;/div&amp;gt;&lt;br&gt;		&amp;lt;div id=&quot;article-outer&quot;&amp;gt;&lt;br&gt;			&amp;lt;div id=&quot;article&quot; class=&quot;px-md-4 pt-3&quot;&amp;gt;&lt;br&gt;&lt;br&gt;				&amp;lt;h1&amp;gt;Mauris eget quam orci&amp;lt;/h1&amp;gt;&lt;br&gt;				&amp;lt;p class=&quot;lead&quot;&amp;gt;Quisque porta varius dui, quis posuere nibh mollis quis. Mauris commodo rhoncus porttitor.&amp;lt;/p&amp;gt;&lt;br&gt;				&amp;lt;div class=&quot;card mb-4&quot;&amp;gt;&lt;br&gt;					&amp;lt;div class=&quot;card-body&quot;&amp;gt;&lt;br&gt;						&amp;lt;p&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut gravida tellus sit amet nibh porttitor, vitae dignissim massa interdum. Vestibulum erat sapien, laoreet et dui tincidunt, faucibus sagittis mi. Nam a pharetra purus, id sagittis nulla. Aliquam cursus, risus ac laoreet lacinia, dui dui egestas nulla, at iaculis tellus erat sed nunc. Nam venenatis elit ac ex accumsan gravida. Curabitur rhoncus, urna vitae efficitur feugiat, massa eros lacinia elit, scelerisque mattis velit purus sed magna. Fusce venenatis magna sed tincidunt fermentum. Etiam at diam tortor. Praesent vel placerat nunc. Pellentesque a enim volutpat, bibendum velit quis, dictum lectus. Aliquam erat volutpat. Fusce massa velit, euismod non suscipit quis, scelerisque id metus. Praesent ex diam, tempus ac aliquam sed, iaculis eu dui. Cras eget magna volutpat, placerat dui et, placerat quam. Vivamus posuere fringilla placerat. Aenean euismod fringilla tempus.&amp;lt;/p&amp;gt;&lt;br&gt;						&amp;lt;p&amp;gt;Aliquam commodo non dui et elementum. Duis eget velit sollicitudin tellus consectetur rutrum non quis urna. Donec eros erat, fringilla ut bibendum nec, sodales eu mauris. Vivamus ex dolor, sodales quis vehicula non, pellentesque in erat. Nunc bibendum quam ac augue pretium ullamcorper. Nullam venenatis augue turpis, id laoreet orci sagittis eget. Quisque orci ipsum, consectetur quis suscipit et, cursus egestas risus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent ultricies nisi vitae sagittis elementum. Suspendisse potenti. Proin vestibulum facilisis euismod. Phasellus pharetra condimentum ante, non sagittis ante semper a. Morbi condimentum semper congue.&amp;lt;/p&amp;gt;&lt;br&gt;						&amp;lt;p&amp;gt;Fusce dapibus feugiat lacinia. Integer congue viverra nisl faucibus ornare. Proin pulvinar tortor magna, vel auctor urna placerat in. Sed volutpat fermentum urna eu cursus. Praesent pretium porttitor orci, sed lobortis lacus aliquam sed. Nam semper odio quis orci congue accumsan. Morbi ac porta est. Nulla bibendum urna quis elit dignissim varius. Suspendisse faucibus eleifend massa ac semper.&amp;lt;/p&amp;gt;&lt;br&gt;						&amp;lt;p&amp;gt;Nulla auctor sed libero sed condimentum. Aliquam molestie dapibus lacus scelerisque egestas. Mauris egestas sed libero eget rutrum. Nam id tempor nibh. Aliquam nibh eros, tempor id dignissim sed, molestie ultrices elit. Pellentesque feugiat et justo id sagittis. Nullam ullamcorper nec est in blandit. Donec id vehicula nunc. Vestibulum molestie ex sit amet quam rutrum lobortis. Proin quis cursus quam. Sed nulla diam, ullamcorper vel sapien vel, pellentesque dignissim dolor. Donec efficitur eros at sapien posuere facilisis. Donec tempor leo arcu, vitae euismod felis gravida vel. Donec fermentum purus orci, vitae convallis quam condimentum quis. In hac habitasse platea dictumst.&amp;lt;/p&amp;gt;&lt;br&gt;						&amp;lt;p class=&quot;mb-0&quot;&amp;gt;Aliquam non quam rutrum, hendrerit ligula id, vulputate felis. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis at purus nec neque ornare scelerisque dapibus id felis. Proin semper sapien eu quam rutrum, at vehicula arcu efficitur. Fusce posuere placerat elementum. Etiam pretium pellentesque est nec imperdiet. Integer accumsan ut lorem vel elementum. Cras molestie mi in risus finibus, et vehicula leo pulvinar. Nam sed erat quis nisl imperdiet porta eget sit amet quam. Maecenas id est nec odio pretium mattis. Cras elementum nibh at ultrices tempus. Cras lacus turpis, ultricies at turpis et, fringilla volutpat mauris.&amp;lt;/p&amp;gt;&lt;br&gt;					&amp;lt;/div&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;&lt;br&gt;				&amp;lt;div class=&quot;card mb-4&quot;&amp;gt;&lt;br&gt;					&amp;lt;div class=&quot;card-body pb-1&quot;&amp;gt;&lt;br&gt;						&amp;lt;div style=&quot;overflow:hidden;width:100%;&quot; class=&quot;mb-4&quot;&amp;gt;&lt;br&gt;							&amp;lt;div style=&quot;height:200px;width:1090px;&quot;&amp;gt;This is an example of handling Google Ads (which get a fixed height and width on load) when the browser window is resized. Your Google Ad code would go in place of this DIV.&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;/div&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;&lt;br&gt;				&amp;lt;div class=&quot;card mb-4&quot;&amp;gt;&lt;br&gt;					&amp;lt;div class=&quot;card-body&quot;&amp;gt;&lt;br&gt;						&amp;lt;p&amp;gt;Vestibulum finibus lacinia eros, sit amet tempus quam sollicitudin in. Morbi ut sollicitudin leo. Phasellus id sem tincidunt, ultrices orci a, accumsan dui. Ut dictum non quam tincidunt laoreet. Ut porta efficitur dui vitae luctus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vivamus interdum, felis ut finibus feugiat, lorem ligula iaculis mauris, sollicitudin tristique nisl urna in orci. Phasellus mattis felis vel dictum venenatis. Curabitur volutpat pharetra augue, vitae condimentum urna sollicitudin ut. Ut bibendum pellentesque ullamcorper. Vestibulum tellus diam, dignissim vel ultricies vel, laoreet non lectus. Aenean dictum leo ut dolor varius suscipit. Nulla scelerisque efficitur turpis et eleifend.&amp;lt;/p&amp;gt;&lt;br&gt;						&amp;lt;p&amp;gt;Sed semper dolor vitae nunc sagittis, sed tristique justo congue. Suspendisse porttitor non lorem id aliquam. Proin dolor enim, laoreet non varius efficitur, dictum sit amet orci. In hac habitasse platea dictumst. Donec tempor, augue et luctus mattis, purus nulla fringilla felis, vitae tincidunt nibh purus eget dolor. Cras dapibus vel lorem vel dignissim. Donec pulvinar tortor vel sem viverra, et dictum augue condimentum. Duis euismod nisi sit amet felis hendrerit mattis.&amp;lt;/p&amp;gt;&lt;br&gt;						&amp;lt;p&amp;gt;In vel fermentum nisl, eget dignissim erat. Sed ante velit, tincidunt at mauris in, lobortis accumsan enim. Integer ac justo vel urna accumsan ornare eget id nulla. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed dignissim libero in congue efficitur. Vivamus commodo cursus dictum. Mauris lobortis erat vel luctus gravida. Donec auctor eget lacus non varius. Mauris volutpat porta sapien, et molestie leo hendrerit et. Ut id libero et quam facilisis molestie. Phasellus venenatis arcu nec sem posuere elementum. Aenean convallis est massa, quis aliquet massa posuere ac.&amp;lt;/p&amp;gt;&lt;br&gt;						&amp;lt;p&amp;gt;Suspendisse potenti. Sed vehicula arcu turpis, nec consectetur mi vestibulum faucibus. Aliquam scelerisque tincidunt felis eget fermentum. Vestibulum fringilla egestas lectus, eget suscipit purus tempus ac. Sed varius tellus a egestas dignissim. Vestibulum laoreet congue nibh ut eleifend. Suspendisse massa tortor, laoreet vel posuere mattis, malesuada nec felis. Cras dapibus elementum lacus a convallis. Vivamus malesuada tempor congue. Mauris sodales arcu sed vehicula maximus.&amp;lt;/p&amp;gt;&lt;br&gt;						&amp;lt;p class=&quot;mb-0&quot;&amp;gt;Nullam et ipsum non tellus auctor rhoncus in id augue. Proin nec orci velit. Ut ut leo eget quam dignissim sagittis. In non quam lectus. Integer auctor urna non scelerisque venenatis. Nam ultrices pretium nisi, sit amet porta urna euismod ut. Donec ornare velit non tincidunt placerat. Sed eu hendrerit risus.&amp;lt;/p&amp;gt;&lt;br&gt;					&amp;lt;/div&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;&lt;br&gt;				&amp;lt;div class=&quot;card mb-4&quot;&amp;gt;&lt;br&gt;					&amp;lt;div class=&quot;card-body&quot;&amp;gt;&lt;br&gt;						&amp;lt;p&amp;gt;If you need to nest rows and columns within the #article area, but not inside a card, they will need special handling.&amp;lt;/p&amp;gt;&lt;br&gt;						&amp;lt;p&amp;gt;Add the no-gutters-xs class to the row element when the columns collapse into rows below the MD breakpoint.&amp;lt;/p&amp;gt;&lt;br&gt;						&amp;lt;p&amp;gt;If you have at least two columns below the MD breakpoint, then you will need to surround your .row with a .container-fluid and add padding.&amp;lt;/p&amp;gt;&lt;br&gt;						&amp;lt;p class=&quot;mb-0&quot;&amp;gt;See the following two rows for examples.&amp;lt;/p&amp;gt;&lt;br&gt;					&amp;lt;/div&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;&lt;br&gt;				&amp;lt;div class=&quot;row no-gutters-xs&quot;&amp;gt;&lt;br&gt;					&amp;lt;div class=&quot;col-md-4 mb-4&quot;&amp;gt;&lt;br&gt;						&amp;lt;div class=&quot;card h-100&quot;&amp;gt;&lt;br&gt;							&amp;lt;div class=&quot;card-body pb-1&quot;&amp;gt;&lt;br&gt;								&amp;lt;p&amp;gt;Sed semper dolor vitae nunc sagittis, sed tristique justo congue. Suspendisse porttitor non lorem id aliquam. Proin dolor enim, laoreet non varius efficitur, dictum sit amet orci. In hac habitasse platea dictumst. Donec tempor, augue et luctus mattis, purus nulla fringilla felis, vitae tincidunt nibh purus eget dolor. Cras dapibus vel lorem vel dignissim. Donec pulvinar tortor vel sem viverra, et dictum augue condimentum. Duis euismod nisi sit amet felis hendrerit mattis.&amp;lt;/p&amp;gt;&lt;br&gt;							&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;div class=&quot;col-md-4 mb-4&quot;&amp;gt;&lt;br&gt;						&amp;lt;div class=&quot;card h-100&quot;&amp;gt;&lt;br&gt;							&amp;lt;div class=&quot;card-body pb-1&quot;&amp;gt;&lt;br&gt;								&amp;lt;p&amp;gt;Suspendisse potenti. Sed vehicula arcu turpis, nec consectetur mi vestibulum faucibus. Aliquam scelerisque tincidunt felis eget fermentum. Vestibulum fringilla egestas lectus, eget suscipit purus tempus ac. Sed varius tellus a egestas dignissim. Vestibulum laoreet congue nibh ut eleifend. Suspendisse massa tortor, laoreet vel posuere mattis, malesuada nec felis. Cras dapibus elementum lacus a convallis. Vivamus malesuada tempor congue. Mauris sodales arcu sed vehicula maximus.&amp;lt;/p&amp;gt;&lt;br&gt;							&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;div class=&quot;col-md-4 mb-4&quot;&amp;gt;&lt;br&gt;						&amp;lt;div class=&quot;card h-100&quot;&amp;gt;&lt;br&gt;							&amp;lt;div class=&quot;card-body pb-1&quot;&amp;gt;&lt;br&gt;								&amp;lt;p&amp;gt;Nullam et ipsum non tellus auctor rhoncus in id augue. Proin nec orci velit. Ut ut leo eget quam dignissim sagittis. In non quam lectus. Integer auctor urna non scelerisque venenatis. Nam ultrices pretium nisi, sit amet porta urna euismod ut. Donec ornare velit non tincidunt placerat. Sed eu hendrerit risus.&amp;lt;/p&amp;gt;&lt;br&gt;							&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;/div&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;&lt;br&gt;				&amp;lt;div class=&quot;container-fluid px-md-0&quot;&amp;gt;&lt;br&gt;					&amp;lt;div class=&quot;row&quot;&amp;gt;&lt;br&gt;						&amp;lt;div class=&quot;col-6 col-sm-4 col md-3 col-lg-2 mb-4&quot;&amp;gt;&lt;br&gt;							&amp;lt;div class=&quot;card h-100&quot;&amp;gt;&lt;br&gt;								&amp;lt;div class=&quot;card-body pb-1&quot;&amp;gt;&lt;br&gt;									&amp;lt;p&amp;gt;&amp;lt;img src=&quot;https://via.placeholder.com/320x240.png?text=Gallery&quot; class=&quot;img-fluid&quot; /&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt;								&amp;lt;/div&amp;gt;&lt;br&gt;							&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;div class=&quot;col-6 col-sm-4 col md-3 col-lg-2 mb-4&quot;&amp;gt;&lt;br&gt;							&amp;lt;div class=&quot;card h-100&quot;&amp;gt;&lt;br&gt;								&amp;lt;div class=&quot;card-body pb-1&quot;&amp;gt;&lt;br&gt;									&amp;lt;p&amp;gt;&amp;lt;img src=&quot;https://via.placeholder.com/320x240.png?text=Gallery&quot; class=&quot;img-fluid&quot; /&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt;								&amp;lt;/div&amp;gt;&lt;br&gt;							&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;div class=&quot;col-6 col-sm-4 col md-3 col-lg-2 mb-4&quot;&amp;gt;&lt;br&gt;							&amp;lt;div class=&quot;card h-100&quot;&amp;gt;&lt;br&gt;								&amp;lt;div class=&quot;card-body pb-1&quot;&amp;gt;&lt;br&gt;									&amp;lt;p&amp;gt;&amp;lt;img src=&quot;https://via.placeholder.com/320x240.png?text=Gallery&quot; class=&quot;img-fluid&quot; /&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt;								&amp;lt;/div&amp;gt;&lt;br&gt;							&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;div class=&quot;col-6 col-sm-4 col md-3 col-lg-2 mb-4&quot;&amp;gt;&lt;br&gt;							&amp;lt;div class=&quot;card h-100&quot;&amp;gt;&lt;br&gt;								&amp;lt;div class=&quot;card-body pb-1&quot;&amp;gt;&lt;br&gt;									&amp;lt;p&amp;gt;&amp;lt;img src=&quot;https://via.placeholder.com/320x240.png?text=Gallery&quot; class=&quot;img-fluid&quot; /&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt;								&amp;lt;/div&amp;gt;&lt;br&gt;							&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;div class=&quot;col-6 col-sm-4 col md-3 col-lg-2 mb-4&quot;&amp;gt;&lt;br&gt;							&amp;lt;div class=&quot;card h-100&quot;&amp;gt;&lt;br&gt;								&amp;lt;div class=&quot;card-body pb-1&quot;&amp;gt;&lt;br&gt;									&amp;lt;p&amp;gt;&amp;lt;img src=&quot;https://via.placeholder.com/320x240.png?text=Gallery&quot; class=&quot;img-fluid&quot; /&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt;								&amp;lt;/div&amp;gt;&lt;br&gt;							&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;div class=&quot;col-6 col-sm-4 col md-3 col-lg-2 mb-4&quot;&amp;gt;&lt;br&gt;							&amp;lt;div class=&quot;card h-100&quot;&amp;gt;&lt;br&gt;								&amp;lt;div class=&quot;card-body pb-1&quot;&amp;gt;&lt;br&gt;									&amp;lt;p&amp;gt;&amp;lt;img src=&quot;https://via.placeholder.com/320x240.png?text=Gallery&quot; class=&quot;img-fluid&quot; /&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt;								&amp;lt;/div&amp;gt;&lt;br&gt;							&amp;lt;/div&amp;gt;&lt;br&gt;						&amp;lt;/div&amp;gt;&lt;br&gt;					&amp;lt;/div&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;&lt;br&gt;			&amp;lt;/div&amp;gt;&lt;br&gt;			&amp;lt;div id=&quot;footer-outer&quot;&amp;gt;&lt;br&gt;				&amp;lt;div id=&quot;footer&quot; class=&quot;px-4 py-4 text-center&quot;&amp;gt;&lt;br&gt;					&amp;copy; Copyright 2018. All Rights Reserved.&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;			&amp;lt;/div&amp;gt;&lt;br&gt;		&amp;lt;/div&amp;gt;&lt;br&gt;	&amp;lt;/div&amp;gt;&lt;br&gt;	&amp;lt;script src=&quot;https://code.jquery.com/jquery-3.3.1.slim.min.js&quot; integrity=&quot;sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo&quot; crossorigin=&quot;anonymous&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br&gt;	&amp;lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js&quot; integrity=&quot;sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49&quot; crossorigin=&quot;anonymous&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br&gt;	&amp;lt;script src=&quot;https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js&quot; integrity=&quot;sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy&quot; crossorigin=&quot;anonymous&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br&gt;	&amp;lt;script&amp;gt;&lt;br&gt;		$(function () {&lt;br&gt;			$(&quot;#nav-show&quot;).click(function () {&lt;br&gt;				$(&quot;#article-outer&quot;).addClass(&quot;article-hide&quot;);&lt;br&gt;				$(&quot;#nav-outer&quot;).addClass(&quot;nav-show&quot;);&lt;br&gt;			});&lt;br&gt;			$(&quot;#nav-hide&quot;).click(function () {&lt;br&gt;				$(&quot;#article-outer&quot;).removeClass(&quot;article-hide&quot;);&lt;br&gt;				$(&quot;#nav-outer&quot;).removeClass(&quot;nav-show&quot;);&lt;br&gt;			});&lt;br&gt;		})&lt;br&gt;	&amp;lt;/script&amp;gt;&lt;br&gt;&amp;lt;/body&amp;gt;&lt;br&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;</description>
<comments>https://johna.compoutpost.com/blog/998/free-bootstrap-4-template-with-side-navigation/#comments</comments>
<pubDate>2018-12-20T12:00:00+10:00</pubDate>
<category>Bootstrap</category>
<image>https://johna.compoutpost.com/blog/uploads/img998_template-sample.jpg</image>
<guid>https://johna.compoutpost.com/blog/998</guid>
</item>
<item>
<title>Bootstrap 4 white buttons and input groups with button addons</title>
<link>https://johna.compoutpost.com/blog/973/bootstrap-4-white-buttons-and-input-groups-with-button-addons/</link>
<description>Bootstrap 4.x doesn't give you white buttons by default, but sometimes white buttons look better, particularly for something like a search box using an input group with button addon placed on a navbar.&lt;br&gt;&lt;br&gt;The outline classes for buttons almost accomplish this but there are some differences in border colours so they don't look quite right.&lt;br&gt;&lt;br&gt;You can accomplish the perfect style with a new css class which I've called `btn-white` in my example:&lt;br&gt;&lt;br&gt;&lt;pre&gt;.btn-white {&lt;br&gt;	background-color: #fff;&lt;br&gt;	border-color: #ced4da;&lt;br&gt;	color: #212529;&lt;br&gt;}&lt;/pre&gt;&lt;br&gt;&lt;br&gt;And sometimes input groups with button addons look even better if the border between the text box and the button is removed. There's a few CSS overrides that can achieve this look simply:&lt;br&gt;&lt;br&gt;&lt;pre&gt;.input-group &gt; .input-group-append &gt; .btn-white {&lt;br&gt;	border-left: solid 1px #fff;&lt;br&gt;}&lt;br&gt;&lt;br&gt;.input-group &gt; .input-group-prepend &gt; .btn-white {&lt;br&gt;	border-right: solid 1px #fff;&lt;br&gt;}&lt;/pre&gt;&lt;br&gt;&lt;br&gt;Here's the final product, with borders (top) and without (bottom).&lt;br&gt;&lt;br&gt;&lt;img alt=&quot;Bootstrap 4 white buttons and input groups with bu&quot; src=&quot;/blog/uploads/img973_bootstrap-4-white-buttons.jpg&quot; class=&quot;img-fluid&quot; /&gt;&lt;br&gt;&lt;br&gt;As a side note, if you are looking for a way to show a magnifying glass without a custom font or image, you can use HTML entity `&amp;amp;#8981;`. Don't forget to provide a fallback for accessibility.</description>
<comments>https://johna.compoutpost.com/blog/973/bootstrap-4-white-buttons-and-input-groups-with-button-addons/#comments</comments>
<pubDate>2018-06-29T12:00:00+10:00</pubDate>
<category>Bootstrap</category>
<image>https://johna.compoutpost.com/blog/uploads/img973_bootstrap-4-white-buttons.jpg</image>
<guid>https://johna.compoutpost.com/blog/973</guid>
</item>
<item>
<title>Improving Bootstrap 4 modals on small screens</title>
<link>https://johna.compoutpost.com/blog/972/improving-bootstrap-4-modals-on-small-screens/</link>
<description>Bootstrap modals are great but on small screens they take up more valuable space than necessary.&lt;br&gt;&lt;br&gt;With a few simple CSS tweaks you can maximise the available space and improve the look of modals on small screens.&lt;br&gt;&lt;br&gt;The first thing to do is to remove the margin around the modal:&lt;br&gt;&lt;br&gt;&lt;pre&gt;@media (max-width: 575px) {&lt;br&gt;	.modal-dialog{margin:0}&lt;br&gt;}&lt;/pre&gt;&lt;br&gt;&lt;br&gt;The media query with maximum width means this change applies just to the XS size. &lt;br&gt;&lt;br&gt;With the margin gone, the border and rounded corners look weird so they need to be removed too:&lt;br&gt;&lt;br&gt;&lt;pre&gt;@media (max-width: 575px) {&lt;br&gt;	.modal-dialog{margin:0}&lt;br&gt;	.modal-content{border:0;border-radius:0}&lt;br&gt;}&lt;/pre&gt;&lt;br&gt;&lt;br&gt;Now we have a much better looking modal that takes up the full width of the screen (middle screen capture on the attached image).&lt;br&gt;&lt;br&gt;A further improvement that can be made is to make the modal take up the full height of the screen too:&lt;br&gt;&lt;br&gt;&lt;pre&gt;@media (max-width: 575px) {&lt;br&gt;	.modal-dialog{margin:0;height:100%}&lt;br&gt;	.modal-content{border:0;border-radius:0;min-height:100%}&lt;br&gt;}&lt;/pre&gt;&lt;br&gt;&lt;br&gt;Here&#8217;s how these changes look compared to the standard Bootstrap style.&lt;br&gt;&lt;br&gt;&lt;img alt=&quot;Improving Bootstrap 4 modals on small screens&quot; src=&quot;/blog/uploads/img972_bootstrap-modal-changes.jpg&quot; class=&quot;img-fluid&quot; /&gt;</description>
<comments>https://johna.compoutpost.com/blog/972/improving-bootstrap-4-modals-on-small-screens/#comments</comments>
<pubDate>2018-06-27T12:00:00+10:00</pubDate>
<category>Bootstrap</category>
<image>https://johna.compoutpost.com/blog/uploads/img972_bootstrap-modal-changes.jpg</image>
<guid>https://johna.compoutpost.com/blog/972</guid>
</item>
<item>
<title>Responsive collapsing search filters in Bootstrap 4</title>
<link>https://johna.compoutpost.com/blog/950/responsive-collapsing-search-filters-in-bootstrap-4/</link>
<description>&lt;img alt=&quot;Responsive collapsing search filters in Bootstrap &quot; src=&quot;/blog/uploads/img950_bootstrap-responsive-collapsing-search-filters.jpg&quot; class=&quot;img-fluid&quot; /&gt;&lt;br&gt;&lt;br&gt;In responsive design there are times when on a mobile screen you want to hide some options with a button to show them, but on a large screen always show these options.&lt;br&gt;&lt;br&gt;For example, a search results page with a bunch of search filters. On a desktop you might want those filters always visible, but on a small screen there might not be enough room and you don't want the search filters at the end of the page because the user would have to scroll all the way to the bottom to find them (they might not know they exist), and you don't want them taking up valuable room at the top of the page.&lt;br&gt;&lt;br&gt;In these cases you want the user to see that filters are available at the top of the small screen page, and give them the option to show these filters with a button.&lt;br&gt;&lt;br&gt;You can do this quite simply in Bootstrap 4 with a few classes.&lt;br&gt;&lt;br&gt;In my example, I'll create a simple two column layout: one for search results and one for search filters. On large screens I want the search filters to be on the right side, but on small screens I want them to appear above the search results and be hidden.&lt;br&gt;&lt;br&gt;So I'll put the search filters column first but use the &quot;order-&quot; classes to re-order them for larger screens (above md).&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;div class=&quot;row&quot;&amp;gt;&lt;br&gt;	&amp;lt;div class=&quot;col-md-3 order-md-last&quot;&amp;gt;&lt;br&gt;		&amp;lt;!--Search filters--&amp;gt;&lt;br&gt;	&amp;lt;/div&amp;gt;&lt;br&gt;	&amp;lt;div class=&quot;col-md-9 order-md-first&quot;&amp;gt;&lt;br&gt;		&amp;lt;!--Search results--&amp;gt;&lt;br&gt;	&amp;lt;/div&amp;gt;&lt;br&gt;&amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;br&gt;Next I'll add a button that uses the &quot;collapse&quot; feature and make this visible on small screens but hide on large screens.&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;button type=&quot;button&quot; data-toggle=&quot;collapse&quot; data-target=&quot;#filters&quot; class=&quot;d-block d-md-none btn btn-primary btn-block mb-3&quot;&amp;gt;Filters &amp;amp;dtrif;&amp;lt;/button&amp;gt;&lt;/pre&gt;&lt;br&gt;And I'll create a DIV that will house my search filters and make this be shows and hidden by the button collapse, but always shown on large screens.&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;div id=&quot;filters&quot; class=&quot;collapse d-md-block&quot;&amp;gt;&lt;br&gt;	&amp;lt;!--Search filters--&amp;gt;&lt;br&gt;&amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;br&gt;See the demo for full example code and see it working.&lt;br&gt;&lt;br&gt;&lt;a href=&quot;/blog/uploads/att950_filters.html&quot; class=&quot;btn btn-primary&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;</description>
<comments>https://johna.compoutpost.com/blog/950/responsive-collapsing-search-filters-in-bootstrap-4/#comments</comments>
<pubDate>2018-03-26T12:00:00+10:00</pubDate>
<category>Bootstrap</category>
<category>Responsive Web Design</category>
<image>https://johna.compoutpost.com/blog/uploads/img950_bootstrap-responsive-collapsing-search-filters.jpg</image>
<guid>https://johna.compoutpost.com/blog/950</guid>
</item>
<item>
<title>Bootstrap 4 fixed navbar that hides until page scrolled up</title>
<link>https://johna.compoutpost.com/blog/947/bootstrap-4-fixed-navbar-that-hides-until-page-scrolled-up/</link>
<description>Fixed navbars &#8211; that stay at the top of the screen at all times &#8211; are common and useful, but sometimes annoying as they can block the top part of the page (sometimes obscuring page anchors).&lt;br&gt;&lt;br&gt;I like the functionality that I have seen on some websites where the navbar will scroll away as you move down the page, but re-appears as soon as you start scrolling up the page.&lt;br&gt;&lt;br&gt;To add this functionality to Bootstrap 4 I made the following changes to the Bootstrap 4 navbar.&lt;br&gt;&lt;br&gt;CSS:&lt;br&gt;&lt;br&gt;&lt;pre&gt;.navbar-outer {&lt;br&gt;	position: relative;&lt;br&gt;	height: 56px;&lt;br&gt;}&lt;br&gt;.absolute-top {&lt;br&gt;	position: absolute;&lt;br&gt;	top: 0;&lt;br&gt;	right: 0;&lt;br&gt;	left: 0;&lt;br&gt;	z-index: 1030&lt;br&gt;}&lt;/pre&gt;&lt;br&gt;&lt;br&gt;jQuery (note two references to the navbar by id, in this example &#8220;navbar1&#8221;):&lt;br&gt;&lt;br&gt;&lt;pre&gt;$(function () {&lt;br&gt;	var lastPos = $(this).scrollTop();&lt;br&gt;&lt;br&gt;	setInterval(function () {&lt;br&gt;		var thisPos = $(this).scrollTop();&lt;br&gt;		if ($(this).scrollTop() &gt; 1 &amp;&amp; thisPos &lt; (lastPos - 2)) {&lt;br&gt;			$(&quot;#navbar1&quot;).removeClass(&quot;absolute-top&quot;).addClass(&quot;fixed-top&quot;);&lt;br&gt;		} else {&lt;br&gt;			if ($(this).scrollTop() &lt;= 1 || thisPos &gt; (lastPos + 2)) {&lt;br&gt;				$(&quot;#navbar1&quot;).removeClass(&quot;fixed-top&quot;).addClass(&quot;absolute-top&quot;);&lt;br&gt;			}&lt;br&gt;		}&lt;br&gt;		lastPos = thisPos;&lt;br&gt;	}, 100);&lt;br&gt;});&lt;/pre&gt;&lt;br&gt;&lt;br&gt;For the HTML markup, several changes are required.&lt;br&gt;&lt;br&gt;1) Add a div around the Bootstrap 4 navbar:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;div class=&quot;navbar-outer&quot;&amp;gt;&lt;br&gt;	&#8230;navbar code here&#8230;&lt;br&gt;&amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;2) Give the navbar an id, the same as used in the jQuery code (&#8220;navbar1&#8221; in the sample).&lt;br&gt;&lt;br&gt;3) Add the class &#8220;absolute-top&#8221; to the navbar, eg:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;div class=&quot;navbar-outer&quot;&amp;gt;&lt;br&gt;	&amp;lt;nav id=&quot;navbar1&quot; class=&quot;navbar navbar-expand-lg navbar-light bg-light absolute-top&quot;&amp;gt;&lt;br&gt;		&#8230;navbar code here&#8230;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;Please see the sample below for a demonstration of this.&lt;br&gt;&lt;br&gt;&lt;a href=&quot;/blog/uploads/att947_sample.html&quot; class=&quot;btn btn-primary&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;</description>
<comments>https://johna.compoutpost.com/blog/947/bootstrap-4-fixed-navbar-that-hides-until-page-scrolled-up/#comments</comments>
<pubDate>2018-03-08T12:00:00+10:00</pubDate>
<category>Bootstrap</category>
<guid>https://johna.compoutpost.com/blog/947</guid>
</item>
<item>
<title>Bootstrap 4 and 5 Customiser</title>
<link>https://johna.compoutpost.com/blog/836/bootstrap-4-beta-customiser/</link>
<description>&lt;img alt=&quot;Bootstrap 4 Customizer website&quot; src=&quot;/blog/uploads/img836_bootstrap-4-customizer-website.jpg&quot; class=&quot;img-responsive&quot; /&gt;&lt;br&gt;&lt;br&gt;I love Bootstrap v4 and now that it is finally in Beta can start to use it in new projects.&lt;br&gt;&lt;br&gt;But I miss the online customizer that was available for Bootstrap v3.&lt;br&gt;&lt;br&gt;Perhaps one day the Bootstrap team will make a v4 customizer available on the &lt;a href=&quot;http://getbootstrap.com/&quot; target=&quot;_blank&quot;&gt;Bootstrap&lt;/a&gt; website but I thought it might be handy to create on myself.&lt;br&gt;&lt;br&gt;Presenting &lt;a href=&quot;http://bootstrapcustomizer.compoutpost.com/&quot; target=&quot;_blank&quot;&gt;Bootstrap Customizer&lt;/a&gt;.&lt;br&gt;&lt;br&gt;I wrote a simple website in PHP and used a Sass library called &lt;a href=&quot;https://github.com/leafo/scssphp&quot; target=&quot;_blank&quot;&gt;scssphp&lt;/a&gt;.&lt;br&gt;&lt;br&gt;Bootstrap Customizer is simply a web form with fields for all Bootstrap Sass variables, and upon submission it compiles these variables and the Bootstrap SCSS files into a single Bootstrap CSS file.&lt;br&gt;&lt;br&gt;Bootstrap Customizer is currently Alpha, and I plan to add some more features as time allows:&lt;br&gt;&lt;br&gt;&lt;ul&gt;&lt;li&gt;Option to exclude Bootstrap v4 components and features&lt;/li&gt;&lt;li&gt;Save customizations to a database so that they can be modified and recompiled&lt;/li&gt;&lt;li&gt;CSS minification&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;br&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; Bootstrap v5 is out now and I have updated Bootstrap Customizer for each Bootstrap release from v4 Beta to the latest v5 release.&lt;br&gt;&lt;br&gt;Customizations are stored to a database and inside each downloaded CSS file there is a link to return to the customizer and make further changes.&lt;br&gt;&lt;br&gt;If a file was generated for an earlier Bootstrap release, you will be given the option to migrate your customizations to the latest release.&lt;br&gt;&lt;br&gt;The website also has a small number of articles on Bootstrap.</description>
<comments>https://johna.compoutpost.com/blog/836/bootstrap-4-beta-customiser/#comments</comments>
<pubDate>2017-10-31T12:00:00+10:00</pubDate>
<category>Bootstrap</category>
<category>Computers & Internet</category>
<image>https://johna.compoutpost.com/blog/uploads/img836_bootstrap-4-customizer-website.jpg</image>
<guid>https://johna.compoutpost.com/blog/836</guid>
</item>
<item>
<title>ASP.NET Web Forms and Bootstrap 3 and 4 Modals</title>
<link>https://johna.compoutpost.com/blog/832/asp-net-web-forms-and-bootstrap-3-modals/</link>
<description>&lt;img alt=&quot;ASP.NET and Bootstrap 4 Modals&quot; src=&quot;/blog/uploads/img832_asp-net-bootstrap-4-modal.jpg&quot; class=&quot;img-fluid&quot; /&gt;&lt;br&gt;&lt;br&gt;&lt;strong&gt;Update: this technique including CSS works without any changes for Bootstrap 4.0 too!&lt;/strong&gt;&lt;br&gt;&lt;br&gt;There are a few methods for hiding and showing Bootstrap 3.x modals in an ASP.NET Web Forms application, including a client script method I mentioned in a &lt;a href=&quot;/blog/778/bootstrap-modals-inside-updatepanels-in-asp-net-web-forms/&quot;&gt;previous post&lt;/a&gt;.&lt;br&gt;&lt;br&gt;This technique is pure ASP.NET (requires no client script) and allows you to show and hide modals by changing the Visible property of a containing PlaceHolder or Panel.&lt;br&gt;&lt;br&gt;The advantage over this method over using client script and the native Bootstrap methods is that the modal will not be affected by full or partial postbacks and will be fully controlled by server-side ASP.NET.&lt;br&gt;&lt;br&gt;A few new CSS classes are needed for this method:&lt;br&gt;&lt;br&gt;&lt;pre&gt;.modal-static-backdrop {&lt;br&gt;	-ms-filter:&quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=50)&quot;;&lt;br&gt;	filter: alpha(opacity=50);&lt;br&gt;	-moz-opacity:0.5;&lt;br&gt;	-khtml-opacity: 0.5;&lt;br&gt;	opacity: 0.5;&lt;br&gt;	background:#000;&lt;br&gt;	height:100%;&lt;br&gt;	left:0;&lt;br&gt;	position:fixed;&lt;br&gt;	top:0;&lt;br&gt;	width:100%;&lt;br&gt;	z-index:2000;&lt;br&gt;}&lt;br&gt;&lt;br&gt;.modal-static {&lt;br&gt;	bottom: auto;&lt;br&gt;	display:block !important;&lt;br&gt;	position:absolute;&lt;br&gt;	z-index:2001;&lt;br&gt;}&lt;/pre&gt;&lt;br&gt;The Bootstrap modal itself needs a few tweaks:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;asp:PlaceHolder ID=&quot;ModalPlaceHolder&quot; runat=&quot;server&quot; Visible=&quot;false&quot;&amp;gt;&lt;br&gt;	&amp;lt;div class=&quot;modal-static-backdrop&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;	&amp;lt;div class=&quot;modal modal-static&quot;&amp;gt;&lt;br&gt;		&amp;lt;div class=&quot;modal-dialog&quot;&amp;gt;&lt;br&gt;			&amp;lt;div class=&quot;modal-content&quot;&amp;gt;&lt;br&gt;				&amp;lt;div class=&quot;modal-header&quot;&amp;gt;&lt;br&gt;					&amp;lt;asp:LinkButton ID=&quot;btnModalCloseHeader&quot; runat=&quot;server&quot; CssClass=&quot;close&quot; OnClick=&quot;btnModalClose_Click&quot;&amp;gt;&amp;lt;span aria-hidden=&quot;true&quot;&amp;gt;&amp;times;&amp;lt;/span&amp;gt;&amp;lt;/asp:LinkButton&amp;gt;&lt;br&gt;					&amp;lt;h4 class=&quot;modal-title&quot;&amp;gt;Sample Modal&amp;lt;/h4&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;				&amp;lt;div class=&quot;modal-body&quot;&amp;gt;&lt;br&gt;					&amp;lt;p&amp;gt;My modal content&amp;lt;/p&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;				&amp;lt;div class=&quot;modal-footer&quot;&amp;gt;&lt;br&gt;					&amp;lt;asp:LinkButton ID=&quot;btnModalCloseFooter&quot; runat=&quot;server&quot; CssClass=&quot;btn btn-primary&quot; OnClick=&quot;btnModalClose_Click&quot; Text=&quot;Close&quot;&amp;gt;&amp;lt;/asp:LinkButton&amp;gt;&lt;br&gt;				&amp;lt;/div&amp;gt;&lt;br&gt;			&amp;lt;/div&amp;gt;&lt;br&gt;		&amp;lt;/div&amp;gt;&lt;br&gt;	&amp;lt;/div&amp;gt;&lt;br&gt;&amp;lt;/asp:PlaceHolder&amp;gt;&lt;/pre&gt;&lt;br&gt;Then to control showing and hiding of the modal you can just set the Visible property of the placeholder, eg:&lt;br&gt;&lt;br&gt;&lt;pre&gt;ModalPlaceHolder.Visible = true; //or false to hide it&lt;/pre&gt;&lt;br&gt;In my example above, the modal is closed using either of the buttons in the header and footer which reference a btnModalClose_Click event which simply sets the PlaceHolder's Visible property to false.&lt;br&gt;&lt;br&gt;Note that you should not use any of Bootstrap's own decoration of elements, eg. data-dismiss=&quot;modal&quot; otherwise you could lose server-side control of the modal.&lt;br&gt;&lt;br&gt;Also note that the modal should be positioned outside of any element that has a CSS 'position' set, otherwise the modal will appear relative to that element. It is best to move your modals out to just within the BODY CSS element.&lt;br&gt;&lt;br&gt;Put the PlaceHolder (or whatever containing control you use) inside an UpdatePanel and the modal will show and hide without a full postback.&lt;br&gt;&lt;br&gt;&lt;b&gt;Update:&lt;/b&gt; Be aware that the modal will always display at the top of the page, but the user may be scrolled further down the page. You should take steps to scroll to the top of the page when showing a modal.&lt;br&gt;&lt;br&gt;If the modal is inside an UpdatePanel then you can use something like the following code when showing your modal.&lt;br&gt;&lt;br&gt;&lt;pre&gt;ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType(), &quot;UpdatePanel1StartupScript&quot;, &quot;setTimeout('window.scrollTo(0,0)', 0);&quot;, true);&lt;/pre&gt;</description>
<comments>https://johna.compoutpost.com/blog/832/asp-net-web-forms-and-bootstrap-3-modals/#comments</comments>
<pubDate>2017-07-06T12:00:00+10:00</pubDate>
<category>Bootstrap</category>
<category>ASP.NET Web Forms</category>
<image>https://johna.compoutpost.com/blog/uploads/img832_asp-net-bootstrap-4-modal.jpg</image>
<guid>https://johna.compoutpost.com/blog/832</guid>
</item>
<item>
<title>Bootstrap 4 card with outline headers and footers</title>
<link>https://johna.compoutpost.com/blog/820/bootstrap-4-card-with-outline-headers-and-footers/</link>
<description>If you use Bootstrap 4 cards and apply one of the outline classes to add some colour you will find the header and footer are still grey, which doesn't look right.&lt;br&gt;&lt;br&gt;This is how they look:&lt;br&gt;&lt;br&gt;&lt;img alt=&quot;Bootstrap 4 card outline - before&quot; src=&quot;/blog/uploads/img820_bootstrap-4-card-outline-before.jpg&quot; class=&quot;img-responsive&quot; /&gt;&lt;br&gt;&lt;br&gt;Personally I think the header and footer should receive the same colour as the outline class.&lt;br&gt;&lt;br&gt;The Bootstrap team have already said no to this when it was suggested on &lt;a href=&quot;https://github.com/twbs/bootstrap/issues/21070&quot; target=&quot;_blank&quot;&gt;GitHub&lt;/a&gt;.&lt;br&gt;&lt;br&gt;Fortunately it is simple to apply some other Bootstrap classes to achieve the desired result. Add the corresponding bg-* class and &quot;text-white&quot;.&lt;br&gt;&lt;br&gt;Example:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&amp;lt;div class=&quot;card card-outline-danger&quot;&amp;gt;&lt;br&gt;  &amp;lt;div class=&quot;card-header bg-danger text-white&quot;&amp;gt;&lt;br&gt;    Header&lt;br&gt;  &amp;lt;/div&amp;gt;&lt;br&gt;  &amp;lt;div class=&quot;card-block&quot;&amp;gt;&lt;br&gt;    The quick brown fox jumps over the lazy dog&lt;br&gt;  &amp;lt;/div&amp;gt;&lt;br&gt;  &amp;lt;div class=&quot;card-footer bg-danger text-white&quot;&amp;gt;&lt;br&gt;    Footer&lt;br&gt;  &amp;lt;/div&amp;gt;&lt;br&gt;&amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;br&gt;And this is how cards can look now:&lt;br&gt;&lt;br&gt;&lt;img alt=&quot;Bootstrap 4 card outline - after&quot; src=&quot;/blog/uploads/img820_bootstrap-4-card-outline-after.jpg&quot; class=&quot;img-responsive&quot; /&gt;&lt;br&gt;&lt;br&gt;Much better, right?</description>
<comments>https://johna.compoutpost.com/blog/820/bootstrap-4-card-with-outline-headers-and-footers/#comments</comments>
<pubDate>2016-12-22T12:00:00+10:00</pubDate>
<category>Bootstrap</category>
<guid>https://johna.compoutpost.com/blog/820</guid>
</item>
</channel>
</rss>
