Skip to content

Commit 80c5d0c

Browse files
author
arjun-sudo
committed
css classes
1 parent 7cd8e1f commit 80c5d0c

File tree

4 files changed

+43
-4
lines changed

4 files changed

+43
-4
lines changed

src/App.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
.App {
23
text-align: center;
34
}
@@ -36,3 +37,40 @@
3637
transform: rotate(360deg);
3738
}
3839
}
40+
41+
.navbar{
42+
43+
height: 100px;
44+
background-color:darkcyan;
45+
color: whitesmoke;
46+
margin-bottom: 15px;
47+
text-align: center;
48+
font-size: 30px;
49+
display: flex;
50+
justify-content: center;
51+
align-items: center;
52+
}
53+
54+
.main{
55+
height:200px;
56+
background-color: turquoise;
57+
color: black;
58+
margin-bottom: 20px;
59+
text-align:center;
60+
font-size: large;
61+
display: flex;
62+
justify-content: center;
63+
align-items: center;
64+
}
65+
.footer{
66+
height: 50px;
67+
text-align: center;
68+
background-color: black;
69+
color: white;
70+
font-weight: 100;
71+
display: flex;
72+
justify-content: center;
73+
align-items: center;
74+
}
75+
76+

src/components/Footer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from "react"
33
function Footer()
44
{
55
return(
6-
<footer>
6+
<footer className="footer">
77
<h3>This is my footer element .</h3>
88
</footer>
99
)

src/components/Header.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import React from "react"
2+
import "../App.css"
23

34
function Header()
45
{
56
return(
6-
<header>
7-
This is header.
7+
<header className="navbar">
8+
Welcome to React World .
89
</header>
910
)
1011
}

src/components/MainContent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function MainContents()
44
{
55
return(
66

7-
<main>
7+
<main className="main">
88
This is the header .
99
</main>
1010

0 commit comments

Comments
 (0)