I have created below CSS and HTML to create a circle and setting images and text the issue which facing in the alignment of center images and text width
Below is my code
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.zoom {
transition: transform .2s;
/* Animation */
}
.zoom:hover {
transform: scale(1.5);
/* (150% zoom - Note: if the zoom is too large, it will go outside of the viewport) */
}
.Title {
text-align: center;
font-family: "Times New Roman", Times, serif;
font-weight: bold;
}
.circle-container {
position: relative;
width: 30em;
height: 28em;
padding: 2.8em;
/*2.8em = 2em*1.4 (2em = half the width of a link with img, 1.4 = sqrt(2))*/
border: double 1px;
border-radius: 50%;
margin: 1.75em auto 0;
border-color: #0f69af !important;
}
.circle-container a {
display: block;
position: absolute;
top: 50%;
left: 50%;
width: 4em;
height: 4em;
margin: -2em;
}
.circle-container img {
display: block;
width: 100%;
}
.deg0 {
transform: translate(12em);
}
/* 12em = half the width of the wrapper */
.deg45 {
transform: rotate(45deg) translate(12em) rotate(-45deg);
}
.deg135 {
transform: rotate(135deg) translate(12em) rotate(-135deg);
}
.deg180 {
transform: translate(-12em);
}
.deg225 {
transform: rotate(270deg) translate(12em) rotate(-270deg);
}
.deg315 {
transform: rotate(315deg) translate(12em) rotate(-315deg);
}
</style>
<div class="circle-container">
<a href="#" class="center">
<div class="zoom"><img src="/Topic/CoEPlatform/EVASites/PublishingImages/whoweare.jpg" alt=""> </div>
</a>
<a href="#" class="deg0">
<div class="zoom">
<div class="Title">Lorem ipsum dolor sit amet</div><img src="" alt=""></div>
</a>
<a href="#" class="deg45">
<div class="zoom">
<div class="Title">Lorem ipsum dolor sit amet</div><img src="" alt=""></div>
</a>
<a href="#" class="deg135">
<div class="zoom">
<div class="Title">Lorem ipsum dolor sit amet</div><img src="" alt=""></div>
</a>
<a href="#" class="deg180">
<div class="zoom">
<div class="Title">Lorem ipsum dolor sit amet </div><img src="" alt=""></div>
</a>
<a href="#" class="deg225">
<div class="zoom">
<div class="Title">Lorem ipsum dolor sit amet</div><img src="" alt=""></div>
</a>
</div>
which give me below output
Issues which facing is
- Center images (left and right) should be aligned in center so it does not overlap bottom images on hover
- Text on Images should come in two lines currently its comes in 4-5 line.
- All images and text should come inside circle ,currently bottom images comes outside border
I tried setting height width of container but it does not worked