Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Bootstrap 4

You're reading from   Mastering Bootstrap 4 Learn how to build beautiful and highly customizable web interfaces by leveraging the power of Bootstrap 4

Arrow left icon
Product type Paperback
Published in Sep 2016
Publisher Packt
ISBN-13 9781783981120
Length 286 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (10) Chapters Close

Displaying images using Bootstrap Lightbox


One important feature missing from our Events section is the ability to include images that illustrate an event (or provide additional information). Sure, you can add images using the img tag, but that may not be very practical, as the image size will be limited by the container's dimensions.

In this section, we will demonstrate how we can overcome this limitation by allowing users to enlarge images as they click on them, without redirecting them away from our page. To this end, go ahead and embed one image with each event (see Figure 5.8). Each image should be aligned to the left of the event description, have a width of 80, and a height of 45:

    <div id="page-1"> 
        <h3>My Sample Event #1</h3> 
        <p> 
            <img src="images/event1.jpg" align="left" width="80"
            height="45"/>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit.
            Curabitur...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime