Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/07/2019, 15:01
Avatar de DragonX
DragonX
Colaborador
 
Fecha de Ingreso: mayo-2002
Ubicación: Funkyland
Mensajes: 8.433
Antigüedad: 21 años, 9 meses
Puntos: 177
Respuesta: DIVS contenedores con ancho excesivo... por qué tanto?

proba esto:

Código CSS:
Ver original
  1. .icons-container {
  2.             display: flex;
  3.             justify-content: space-between;
  4.             align-items: center;
  5.             width: 100%;
  6.             height: 70px;
  7.             margin: 40px auto;
  8.             box-sizing: border-box;
  9.             border-radius: 10px;
  10.             background-color: rgba(255,255,255,0.35);
  11. }
  12. .icon-box {
  13.     padding:0 40px;
  14.     margin: 0 5px;
  15.     display:flex;
  16.     align-items: center;
  17.     justify-content: center;
  18.    
  19. }
  20. .icon-box img {
  21.             width: 60px;
  22.             height: 44px;
  23.             margin-right: 12px;
  24. }
  25. .icon-box h1 {
  26.             font-family: roboto;
  27.             font-weight: 700;
  28.             font-size: 15px;
  29.             color: #222;
  30. }
  31. .icon-box h2 {
  32.             font-family: roboto;
  33.             font-weight: 400;
  34.             font-size: 14px;
  35.             color: #222;
  36.             margin-top: -12px;
  37. }

Código HTML:
Ver original
  1. <div class="icons-container">
  2.  
  3.      <div id="icon-1" class="icon-box">
  4.             <img src="images/icon-1.png">
  5.             <div class="txt">
  6.                 <h1>TITULO 1</h1>
  7.                 <h2>Subtítulo 1</h2>
  8.             </div>
  9.         </div>
  10.         ....
  11. </div>

Slds
__________________
Desarrollos dosLotos
Calendario Maya, Meditación, Osho