8000 box property div centre · anshi-the-coder/Javascript@075a812 · GitHub
[go: up one dir, main page]

Skip to content

Commit 075a812

Browse files
box property div centre
1 parent 04ba0df commit 075a812

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Box-Property-Div-Centre/index.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width">
6+
<title>JS Bin</title>
7+
<style>
8+
#main{
9+
background-color:red;
10+
width:200px;
11+
padding:20px;
12+
border:2px solid orange;
13+
display:flex;
14+
justify-content:center;
15+
}
16+
#child{
17+
background-color:blue;
18+
padding:10px;
19+
width:50px;
20+
color:white;
21+
border:2px solid white;
22+
text-align:center;
23+
//margin:0px auto;
24+
}
25+
</style>
26+
</head>
27+
<body>
28+
<div id="main">
29+
<div id="child">
30+
Hello
31+
</div>
32+
</div>
33+
</body>
34+
</html>

0 commit comments

Comments
 (0)
0