Skip to content

Commit

Permalink
Merge pull request #86 from shrutiSamantaray/main
Browse files Browse the repository at this point in the history
issue 5 resolved
  • Loading branch information
IshitaSatpathy authored Oct 9, 2022
2 parents 2b71b68 + c38e6da commit 9693e5a
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 0 deletions.
Binary file added Shruti Samantaray/Using Flexbox/flex1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions Shruti Samantaray/Using Flexbox/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!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>Centre an image</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<img src="flex1.jpg">
</div>
</body>
</html>
18 changes: 18 additions & 0 deletions Shruti Samantaray/Using Flexbox/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
*{
box-sizing: border-box;
}
body{
background-color: rgb(34, 174, 92);
}
.container{
display: flex;
justify-content: center;
align-items: center;
width: 100%;

}
.container img{
width: 50%;
padding: 30px;
margin: 75px;
}
Binary file added Shruti Samantaray/Without using Flexbox/img1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions Shruti Samantaray/Without using Flexbox/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!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>Centre an image</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<img src="img1.jpg">
</div>
</body>
</html>
10 changes: 10 additions & 0 deletions Shruti Samantaray/Without using Flexbox/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
body{
background-color: pink;
}
.container img{
display: block;
width: 55%;
/* height: auto; */
margin: auto;
padding: 50px;
}

0 comments on commit 9693e5a

Please sign in to comment.