Skip to content

Commit

Permalink
Merge pull request #286 from Ashish01122020/main
Browse files Browse the repository at this point in the history
Centre an image without using flexbox
  • Loading branch information
IshitaSatpathy authored Oct 25, 2022
2 parents 712aa23 + 21f323b commit ceb2e35
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Binary file added Ashish01/centre img without flex/certificate.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions Ashish01/centre img without flex/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!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">
<title>Image Center</title>
</head>
<style>
body{
background-color: aliceblue;
overflow: hidden;
}
img{
margin-left: 50vw;
margin-top: 50vh;
transform: translate(-50%, -50%);
max-height: 450px;
}
</style>
<body>
<div>
<img src="certificate.jpg" alt="IMAGE">
</div>
</body>
</html>

0 comments on commit ceb2e35

Please sign in to comment.