File tree Expand file tree Collapse file tree
components/clock/AnalogClock Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ( ) }
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments