Skip to content

Service area error fix #3

@Tharindu37

Description

@Tharindu37
<section class="services">
            <div class="image-container">
                <div class="image-item image1">
                    <div class="text-overlay">
                        <h3>24H ROOM SERVICE</h3>    
                    </div>
                     <div class="text-inner">
                        <div>
                            <h3>RESTAURANT AND BARS</h3>
                            <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Officiis, in.</p>
                        </div>
                    </div> 
                </div>
                <div class="image-item image2">
                    <div class="text-overlay">
                        <h3>RESTAURANT AND BARS</h3>
                    </div>
                    <div class="text-inner">
                        <p>haaaaaaai</p>
                    </div> 
                </div>
                <div class="image-item image3">
                    <div class="text-overlay">
                        <h3>EVENTS AND MEETINGS</h3>
                    </div>
                    <div class="text-inner">
                        <p>haaaaaaai</p>
                    </div> 
                </div>
                <div class="image-item image4">
                    <div class="text-overlay">
                        <h3>FITNESS AND SPA</h3>
                    </div>
                    <div class="text-inner">
                        <p>haaaaaaai</p>
                    </div> 
                </div>
            </div>
        </section>
/*Services*/
.image-container{
    display: flex;
    justify-content: space-between;
    height: 570px;
    align-items: end;
    width: 100%;
}
.image-item{ 
    position: relative;
    align-items: center;
    display: flex;
    width: 25%;
    background-size: cover;
    height: 550px;
    transition: height 0.4s ease;
}
.image1{
    background:url('images/room.jpg') no-repeat;
}
.image2{
    background:url('images/5fee5cb865ebe1d62fa317200e2986ae.jpg') no-repeat;
}
.image3{
    background:url('images/fitness.jpg') no-repeat;
}
.image4{
    background:url('images/meeting.jpg') no-repeat;
}
.image-item:hover{
    height: 570px;  
}
.text-overlay{
    color:#ffffff;
    width: 100%;
    height: 100%;
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
    background-color: rgba(0, 0, 0, 0.5);
}

.text-inner {
    opacity: 0;
    transition: opacity 0.3s;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    width: 100%;
    height: 100%;
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.text-inner>div{
    width: 75%;
    text-align: center;
}
.image-item:hover .text-overlay {
    opacity: 0;
}
  
.image-item:hover .text-inner {
    opacity: 1;
}

.text-overlay h3{
    font-family: 'Lato', sans-serif;
    font-size: 25px;
    margin: 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions