JSFiddle - React, Tailwind, and code Playground

HTML

<!-- Gallery Image 1 -->
<div class="thumbox">
  <a href="#openphoto2">
    <img src="http://www.ghyllfarm.co.uk/Assets/Images/Yantanthumb.jpg" width="110" height="110" alt="Room 1 - Double bed">
  </a>
  <div id="openphoto2" class="modalDialog">
    <div id="landscapephoto">
      <a href="#close" title="Close" class="close">X
							</a>
      <img src="http://www.ghyllfarm.co.uk/Assets/Images/Yantan.jpg" width="837" height="558" alt="Room 1 - Double bed">
      <div class="photolabel">Yan - Double bed
      </div>
    </div>
  </div>
</div>
<div class="thumblabel">Yan - Double bed
</div>


<!-- Gallery Image 2 -->

<div class="thumbox">
  <a href="#openphoto3">
    <img src="http://www.ghyllfarm.co.uk/Assets/Images/bath2_thumb.jpg" width="110" height="110" alt="Room 1 - Bathroom">
  </a>
  <div id="openphoto3" class="modalDialog">
    <div id="portraitphoto">
      <a href="#close" title="Close" class="close">X
							</a>
      <img src="http://www.ghyllfarm.co.uk/Assets/Images/bath2.jpg" height="876" width="657" alt="Room 1 - Bathroom">
      <div class="photolabel">Yan - Bathroom
      </div>
    </div>
  </div>
</div>
<div class="thumblabel">Yan - Bathroom
</div>

CSS

img {
  width: 100%;
  height: 100%;
  width: auto\9;
  /* ie8 */
}

.thumbox {
  width: 110px;
  height: 110px;
  Margin: 0px auto 0px auto;
  /*border: dotted;
	border-width: 1px;
	border-color: #0F3;*/
}

.thumblabel {
  width: 110px;
  height: 20px;
  Margin: 10px auto 10px auto;
  font-family: Tahoma, Geneva, sans-serif;
  font-size: 12px;
  text-align: center;
  color: #060;
  /*border: dotted;
	border-width: 1px;
	border-color: #0F3;*/
}

.modalDialog {
  position: fixed;
  font-family: Arial, Helvetica, sans-serif;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99999;
  opacity: 0;
  -webkit-transition: opacity 400ms ease-in;
  -moz-transition: opacity 400ms ease-in;
  transition: opacity 400ms ease-in;
  pointer-events: none;
}

.modalDialog:target {
  opacity: 1;
  pointer-events: auto;
}

.modalDialog > div {
  position: fixed;
  top: 50%;
  left: 50%;
  -ms-transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  padding: 15px 15px 5px 15px;
  border-radius: 10px;
  background: #fff;
}

#landscapephoto {
  width: 50vw; /* 50% of viewport width */
  height: 37.5vw; /* = 50 * (3/4), i.e. three-quarters of viewport width */
}

#portraitphoto {
  width: 46.67vh; /* = 70 * (2/3), i.e. two-thirds of viewport height */
  height: 70vh; /* 70% of viewport height */
  padding-bottom: 40px;
}

.close {
  background: #606061;
  color: #FFFFFF;
  line-height: 25px;
  position: absolute;
  right: -12px;
  text-align: center;
  top: -10px;
  width: 24px;
  text-decoration: none;
  font-weight: bold;
  -webkit-border-radius: 12px;
  -moz-border-radius: 12px;
  border-radius: 12px;
  -moz-box-shadow: 1px 1px 3px #000;
  -webkit-box-shadow: 1px 1px 3px #000;
  box-shadow: 1px 1px 3px #000;
}

.close:hover {
  background: #00d9ff;
}

.photolabel {
  width: 300px;
  height: 20px;
  Margin: 10px auto 10px auto;
  font-family: Tahoma, Geneva, sans-serif;
  font-size:...