Skip to content

Commit 93391d0

Browse files
committed
Updated the css
1 parent 137cadc commit 93391d0

2 files changed

Lines changed: 46 additions & 3 deletions

File tree

src/components/clock/AnalogClock/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ class AnalogClock extends Component {
6060
renderClock = () => {
6161
return (
6262
<div className="react-clock__face">
63-
<h6 style={{top: 30, position: 'absolute', left: 150, color: "#2a2a2a"}}>Made By:</h6>
64-
<h6 style={{top: 220, position: 'absolute', left: 165, color: "#2a2a2a"}}>AMAN</h6>
63+
<h6 className="text-top">Made By:</h6>
64+
<h6 className="text-bottom" >AMAN</h6>
6565
{this.renderMinuteMarks()}
6666
{this.renderHourMarks()}
6767
</div>
@@ -123,7 +123,7 @@ class AnalogClock extends Component {
123123

124124
render() {
125125
return (
126-
<div style={{left: "40%", height: 400, width: 400, position: 'absolute'}}>
126+
<div className="clock__analog">
127127
{this.renderClock()}
128128
{this.renderHourHand()}
129129
{this.renderMinuteHand()}

src/styles/App.less

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,46 @@
2424
padding: .6em 1.4em .5em .8em;
2525
border-radius: 4px;
2626
}
27+
28+
.clock__analog {
29+
left: 40%;
30+
height: 400px;
31+
width: 400px;
32+
position: absolute;
33+
}
34+
35+
.text-top {
36+
top: 30px;
37+
position: absolute;
38+
left: 150px;
39+
color: #2a2a2a;
40+
}
41+
42+
.text-bottom {
43+
top: 220px;
44+
position: absolute;
45+
left: 165px;
46+
color: #2a2a2a;
47+
}
48+
49+
@media only screen and (max-width: 576px) {
50+
.clock__analog {
51+
left: 25%;
52+
height: 200px;
53+
width: 200px;
54+
}
55+
56+
.text-top {
57+
top: 15px;
58+
position: absolute;
59+
left: 70px;
60+
color: #2a2a2a;
61+
}
62+
63+
.text-bottom {
64+
top: 105px;
65+
position: absolute;
66+
left: 75px;
67+
color: #2a2a2a;
68+
}
69+
}

0 commit comments

Comments
 (0)