2
I have a question that is consuming me a lot of time, next:
I need to center the counter of the image below, but it needs to be at the bottom of the screen (with position:absolute
) and the div
of it has variable size.
If mine div
had a fixed size, could use quietly margin:0 auto;
But besides being variable, is with position:absolute;
and with bottom:0;
, follow full code:
#clock{
position: absolute;
bottom: 0;
margin: 0 auto;
}
See how it gets:
Any suggestions?
Oi Fernando, which means variable size?
– Cold
Do you really need to be div? Sometimes it’s worth appealing to a table (or "display:table") for this kind of thing.
– hugomg
Variable is because it does not have a defined width, it will depend on the numbers and the screen resolution.
– Fernando Tholl Nascimento