Popopomodoro Clock - progress bar

Popopomodoro Clock - progress bar
0.0 0

#1

Hi guys! How are you?
I made my Pomodoro Clock. I need an help to center the text in my progress bar, some tips? I tried adding margin-left but this doesn’t work with. Anyway, here my project:


#2

#now{
border-radius:40px 40px 0 0;
margin: 0 auto;
width: 340px;
height: 87px; // here
font-size: 40px;
text-align:center;
background-color:#999;
overflow:hidden;
}
.text{
z-index:9;
position:absolute; //here
width: 340px; //here
}

i changed three places in your css;


#3

Thank you, this works well. The problem is when I reset. Progress bari doesn’t work good.


#4

“time_max” is actually changed in the reset block, but it will be assigned to argument again at line8 and line13;

so here’s the solution

$("#reset").on(“click”,function(){
if(!break_ex) {
break_dur = parseInt($("#break_dur").html())*60;
timer = break_dur;
}else{
work_dur = parseInt($("#work_dur").html())*60;
timer = work_dur;
}});


#5

You solved all my problems! Thank you so much. :slight_smile: