CSS - Ayuda con flexbox

 
Vista:
Imágen de perfil de Ricardo
Val: 11
Ha aumentado su posición en 11 puestos en CSS (en relación al último mes)
Gráfica de CSS

Ayuda con flexbox

Publicado por Ricardo (7 intervenciones) el 24/08/2018 01:19:36
Bueno he estado usando flexbox y quise poner el sticky footer
pero lo que me pasa esque cuando pongo el body y el contenedor al 100% de altura todos mis bloques de contenido tienen un espaciado en blanco nose porque.


help

HTML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html lang="es">
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <link rel="stylesheet" href="css/style.css">
    </head>
    <body>
        <div class="contenedor">
            <nav class="menu">
                <header class="logo"><img src="">LOGO</header>
                <li><a href="">Inicio</a></li>
                <li><a href="">Proyectos</a></li>
                <li><a href="">Contacto</a></li>
                <li><a href="">Equipo</a></li>
            </nav>
            <div class="imagenes">
                ACA IRAN IMAGENES sadasd
            </div>
            <article>
                <header>Titulo del articulo</header>
            </article>
            <footer>
 
            </footer>
        </div>
    </body>
</html>

CSS:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/* 
    Created on : 22-ago-2018, 21:07:39
    Author     : Ricardo
*/
 
* {
    margin: 0;
    padding: 0;
}
 
html, body {
    height: 100%;
}
.contenedor {
    min-height: 100%;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    border: 2px solid red;
 
}
 
.menu {
    height: 25px;
    border: 2px solid yellow;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
 
}
 
.menu li {
    list-style: none;
}
 
.menu li a {
    text-decoration: none;
}
 
.imagenes {
    margin: 0;
    border: 2px solid black;
    width: 100%;
    height: 50px;
}
 
article {
    margin: 0;
    border: 2px solid orange;
    width: 100%;
    height: 50px;
}
 
footer {
    align-self: flex-end;
    border: 2px solid green;
    width: 100%;
    height: 100px;
}
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de abzerox
Val: 78
Ha mantenido su posición en CSS (en relación al último mes)
Gráfica de CSS

Ayuda con flexbox

Publicado por abzerox (21 intervenciones) el 25/08/2018 00:02:33
Hola, modifique un poco tu css. Nos comentas si era lo que buscabas.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
 
        html,
        body {
            height: 100%;
            min-height: 100vh;
        }
 
        .contenedor {
            min-height: 100vh;
            height: 100%;
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            flex-direction: column;
            align-items: flex-start;
            border: 2px solid red;
 
        }
 
        .contenedor>div,
        .contenedor>article {
            flex: 1 1 auto;
        }
 
        .menu {
            height: 25px;
            border: 2px solid yellow;
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-around;
            align-items: center;
 
        }
 
        .menu li {
            list-style: none;
        }
 
        .menu li a {
            text-decoration: none;
        }
 
        .imagenes {
            margin: 0;
            border: 2px solid black;
            width: 100%;
            height: 50px;
        }
 
        article {
            margin: 0;
            border: 2px solid orange;
            width: 100%;
            height: 50px;
        }
 
        footer {
            align-self: flex-end;
            border: 2px solid green;
            width: 100%;
            height: 100px;
        }
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar