Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Piyush7/img.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions Piyush7/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Center Image with Flexbox</title>
<style>
body {
margin: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}

.image-container {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}

.centered-image {
max-width: 100%;
max-height: 100%;
}
</style>
</head>
<body>
<div class="image-container">
<img class="centered-image" src="img.jpeg" alt="Centered Image">
</div>
</body>
</html>
1 change: 1 addition & 0 deletions Piyush7/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## issue solved