Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
How do I decrease the font size of specific elements in a date displayer

I am creating a website in html. What I want to do decrease the size of the hour, minute and second counter, but keep the size of the day, month and year counters. Splitting the 2 into separate id's doesn't seem to work and only shows the day, month and year. Here's my code:

<html>
<head><title>My website</title>
<style type=text/css>
.clock {background-color: 000000; text-align: center; margin: 2px 0px 0px 1190px; font-size: 30px; position: fixed; border-radius: 10px;   color: #fff; text-shadow: 0 0 4px #fff, 0 0 4px #fff, 0 0 4px #fff; border: 5px solid white;}
div {margin: 2px;}
body {background-color: 0d0d0d; font-family: "Vibur", sans-serif;}
</style>
</head>
<body>
  <p id="date" class="clock"></p>
  <script>
  setInterval(function(){
  date = new Date();
  sekundy = date.getSeconds();
  if (sekundy<10) sekundy = "0"+sekundy;
   minuty = date.getMinutes();
  if (minuty<10) minuty = "0"+minuty;
   godziny = date.getHours()
  if (godziny<10) godziny = "0"+godziny;
   dzien = date.getDay();
   data = date.getDate();
   miesiac = date.getMonth();
   rok = date.getFullYear();
  document.getElementById('date').innerHTML = data+"."+((miesiac+1)%12)+"."+rok+"<br>"+godziny+" : "+minuty+" : "+sekundy;
  },1000);
  </script>
</body>
</html>
I would gladly appreciate any help with figuring it out.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda