0

I have simple gallery that I show like so

<a href="img/graph_asset_view/center_image_1.jpg">
    <img src="img/graph_asset_view/center_image_1.jpg" />
</a>

Is it possible to show div instead of image on center? I tried to do something like this but it didn't work. It showed the image like even I didn't change anything.

<div style="width: 300px; height: 300px; background: blue;">
    <img src="img/graph_asset_view/center_image_1.jpg" />
</a>
Stan
  • 25,744
  • 53
  • 164
  • 242

3 Answers3

0

Please try below code :-

 <div  style="width: 300px; height: 300px; background:
 blue;cursor:pointer;"   
 onclick="document.location='img/graph_asset_view/center_image_1.jpg'">
       <img src="img/graph_asset_view/center_image_1.jpg" />

 </div>
kaushik0033
  • 679
  • 6
  • 12
0

I assume you are asking to do the following, placing a inside of the anchor link instead of the images. Correct? If so, just do the following:

  <a style="display:block" href="http://justinbieber.com">
     <div class="xyz" style="min-height:500px;min-width:300px;">My div content here!
     </div>
    </a>
Casey ScriptFu Pharr
  • 1,672
  • 1
  • 16
  • 36
0

Use the "layer" property of the image json to display the div. You can set the width and height of the layer the same as the image. So only the overlay will be seen. And it is swipeable! See here for detail: http://galleria.io/docs/references/data/

xxinerKYU
  • 1,005
  • 8
  • 11