0

I want to make an "image set" using lightbox in bootstrap 4. The problem in the code is that the lightbox opens with the final image... Please tell me where I am doing it wrong. I just started coding. Thanks...

<div class="col-md-4">
                  <a href="images/SC/SC-1.jpg" data-lightbox="SCTM" data-title="Science Center and Technology Museum">
                  <a href="images/SC/SC-Concept.jpg" data-lightbox="SCTM" data-title="Analysis">
                  <a href="images/SC/SC-Groundfloor.jpg" data-lightbox="SCTM" data-title="Floor Plans">
                  <a href="images/SC/SC-Floorplans.jpg" data-lightbox="SCTM" data-title="Floor Plans">
                  <a href="images/SC/interior.jpg" data-lightbox="SCTM" data-title="Ground Floor Interior View">
                  <a href="images/SC/SC-Sections2.jpg" data-lightbox="SCTM" data-title="Section Plan">
                  <a href="images/SC/SC-Sections.jpg" data-lightbox="SCTM" data-title="Section Plans">
                  <a href="images/SC/Landscape.jpg" data-lightbox="SCTM" data-title="Landscape View">
                    <div class="imageContainer">
                        <img src="images/SC/SC_cover.jpg" class="img-fluid">
                        <div class="imageOverlay">
                            <div class="imageText">
                                <h4>Science Center and Technology Museum</h4>
                                <h5>Project Location:</h5>
                                <p>Golden Horn/Istanbul</p>
                                <h5>Project Type:</h5>
                                <p>Museum</p>
                                <h5>Project Date:</h5>
                                <p>2017</p>
                                <h5>Project Area:</h5>
                                <p>17.000 sqm</p>
                            </div>
                        </div>
                    </div>
                 </a>
                 </a>
                 </a>
                 </a>
                 </a>
                 </a>
                 </a>
                 </a>
            </div>
            <div class="col-md-4">

2 Answers2

0

You need to give the user something to click. You have links but no words located inside for the user to click on to activate the picture. For example, you could do this uniquely to each link:

<a href="images/SC/SC-Concept.jpg" rel="lightbox" data-lightbox="SCTM" data-title="Analysis">Concept</a>

Also, if you can give us a sample of what the code works like, that would help others help you. I recommend a site like Codepen. There might be other issues but again, it's hard to see what you're working with without a live example.

Pete Adam Bialecki
  • 183
  • 1
  • 3
  • 9
0

It worked when I did this!

<div class="col-md-4"> <a href="images/SC/SC-1.jpg" data-lightbox="SCTM" data-title="Science Center and Technology Museum"> <div class="imageContainer"> <img src="images/SC/SC_cover.jpg" class="img-fluid"> <div class="imageOverlay"> <div class="imageText"> <h4>Science Center and Technology Museum</h4> <h5>Project Location:</h5> <p>Golden Horn/Istanbul</p> <h5>Project Type:</h5> <p>Museum</p> <h5>Project Date:</h5> <p>2017</p> <h5>Project Area:</h5> <p>17.000 sqm</p> </div> </div> </div> </a> <a href="images/SC/SC-Concept.jpg" data-lightbox="SCTM" data-title="Analysis"></a> <a href="images/SC/SC-Groundfloor.jpg" data-lightbox="SCTM" data-title="Floor Plans"></a> <a href="images/SC/SC-Floorplans.jpg" data-lightbox="SCTM" data-title="Floor Plans"></a> <a href="images/SC/interior.jpg" data-lightbox="SCTM" data-title="Ground Floor Interior View"></a> <a href="images/SC/SC-Sections2.jpg" data-lightbox="SCTM" data-title="Section Plan"></a> <a href="images/SC/SC-Sections.jpg" data-lightbox="SCTM" data-title="Section Plans"></a> <a href="images/SC/Landscape.jpg" data-lightbox="SCTM" data-title="Landscape View"></a> </div> <div class="col-md-4">