For my latest project, I am working on creating a comic book page. After successfully designing a cover that opens up, I am now facing a challenge in adding separate blocks to the first page to resemble a classic comic book layout.
However, every time I attempt to integrate these blocks, it seems to disrupt the positioning of my cover. You can see an example here: https://codepen.io/reallynotprogramming/pen/GadVZJ
I have tried nesting individual divs within my main container div, but unfortunately, it doesn't seem to be resolving the issue.
body {
background-image: url('images/Avenger\ vs\ Justice\ League2-01.jpg');
background-size: contain;
background-position: center;
}
.flex-container {
/* display: flex;
flex-direction: row; */
background-color: white;
height: 820px;
width: 700px;
margin-top:40px;
margin-bottom: 40px;
margin-left: 500px;
box-shadow: 20px 20px;
}
.cover {
background-image: url(https://upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Symbol_from_Marvel%27s_The_Avengers_logo.svg/877px-Symbol_from_Marvel%27s_The_Avengers_logo.svg.png);
width: 700px;
height: 820px;
transform: rotateY(0deg);
background-color: blue;
transform-style: preserve-3d;
transform-origin: left;
transition: all .5s ease-in;
}
.flex-container:hover .cover{
transform: rotateY(-180deg);
}
.page1 {
width: 700px;
height: 820px;
margin-top: 75px;
margin-left: 100px;
background-color: green;
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Avengers vs JL</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- CSS Link -->
<link rel="stylesheet" type="text/css" href="project.css">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<!--Comic Book-->
<div class="flex-container">
<div class="cover"></div>
<div class="page1">Test</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>