OK. Dostawiłem link na fotce i zdjęcie powiększone widoczne jest przed kliknięciem
Gdzie nalezy wstawić ukrywanie zeby dopiero po klkneciu na miniaturkę otworzyło sie duże zdęcie ?
A druga rzecz po kliknięciu fotka jest znowu na górze a nie na środku w pionie ... dlaczego

?
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<style>
.mod { /* czarne tło pod zdjęciem - główny kontener */
z-index:1;
display:none;
position:fixed;
left:0;
top:0;
width:100%;
height:100%;
background-color:rgb(0,0,0);
background-color:rgba(0,0,0,0.8);
justify-content: center;
align-items: center;
display: flex;
}
.container { /* kontener - zdjęcie z krzyżykiem */
position:relative;
width:85%;
cursor:pointer;
text-align: center;
vertical-align: middle;
margin-left: auto;
margin-right: auto;
/*margin-top: +0.0em;
margin-bottom: +0.0em;*/
text-align: center;
}
.krzyzyk { /* położenie i rozmiar krzyżyka */
position: absolute;
top: 8px;
right: 8px;
width:15px;
opacity: 0.3;
background-color: inherit;
}
.img_ramka { width: 100%;
border-radius: 0px;
background-color: white;
padding: 2px 2px 2px 2px; /* grubość obramowania zdjęcia */
}
.paczka {
width: 80%;
min-width:402px;
max-width:1000px;
margin-left: auto;
margin-right: auto;
}
.button {
border:none;
display:inline-block;
padding:0px 0px;
text-decoration:none;
background-color:inherit;
width:100%;
cursor:pointer;
}
</style>
</head>
<body>
<button onclick="document.getElementById('id03').style.display='block'" class="button">
<img width="300" src="galeria/03.jpg" border="0" style="margin:0 auto; ">
</button>
<div id="id03" class="mod">
<div class="paczka">
<div class="container">
<a onclick="document.getElementById('id03').style.display='none'"> <img src="03.jpg" class="img_ramka"></a>
<div><img class="krzyzyk" src="close.png"></div>
</div>
</div>
</div>
</body>
</html>