Skip to content

Commit

Permalink
Merge pull request #51 from jyotiprakashh/main
Browse files Browse the repository at this point in the history
Issue #5 resolved
  • Loading branch information
IshitaSatpathy authored Oct 7, 2022
2 parents 52773df + 1e0e6a4 commit 8c1e8a9
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
Binary file added Jyotiprakash#5/image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions Jyotiprakash#5/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Center an image without using flexbox</title>
</head>
<body>
<div class="container">
<div class="image">
<img src="image.jpg" alt="E-Cell Vssut">
</div>
</div>
</body>
</html>
23 changes: 23 additions & 0 deletions Jyotiprakash#5/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
body{
background-color: black;
}
.container{
position: relative;
}
/* .image{
width:80%;
min-height:80vh;
margin:auto;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,50%);
} */

.image img{
display: block;
margin:0 auto;
width:60%;
padding: 10% 0;

}

0 comments on commit 8c1e8a9

Please sign in to comment.