I'm having a problem with my website.
When I open https://www.b3lieve.com.mx/precios.html the card-prices section works correctly (if it's in computer).
But if I visualize the same section but in a mobile or using the responsive design tool, it doesn’t work or have design. What should I do?
visualized from responsive design tool
visualized from computer
I tried it from localhost and it works correctly either computer or responsive design. Could be a problem with my hosting service?
Here's the code...
`
<div class="packs" style="padding-top:80px;">
<h2 style="text-align:center;">Booth 360°</h2>
<div class="pricing-table" id="360">
<div class="pricing-card">
<h3 class="pricing-card-header">Básico</h3>
<div class="price"><sup>$</sup>5,300 MXN</div>
<ul>
<li><strong>1</strong> Booth 360°.</li>
<li><strong>2</strong> horas de servicio.</li>
<li><strong>2</strong> personas de Staff.</li>
<li>Videos y fotos<strong> ilimitados</strong> durante todo el servicio.</li>
<li><strong>2</strong> templates diferentes y props.</li>
<li>Transportación dentro de la <strong>Ciudad de México</strong>.</li>
</ul>
Seleccionar
</div>
</div>
<div class="pricing-table">
<div class="pricing-card">
<h3 class="pricing-card-header">Clásico</h3>
<div class="price"><sup>$</sup>6,800 MXN</div>
<ul>
<li><strong>1</strong> Booth 360°.</li>
<li><strong>3</strong> horas de servicio.</li>
<li><strong>2</strong> personas de Staff.</li>
<li>Videos y fotos<strong> ilimitados</strong> durante todo el servicio.</li>
<li><strong>4</strong> templates diferentes y props.</li>
<li>Transportación dentro de la <strong>Ciudad de México</strong>.</li>
</ul>
Seleccionar
</div>
</div>
<div class="pricing-table">
<div class="pricing-card">
<h3 class="pricing-card-header">Prémium</h3>
<div class="price"><sup>$</sup>8,300 MXN</div>
<ul>
<li><strong>1</strong> Booth 360°.</li>
<li><strong>5</strong> horas de servicio.</li>
<li><strong>2</strong> personas de Staff.</li>
<li>Videos y fotos<strong> ilimitados</strong> durante todo el servicio.</li>
<li><strong>6</strong> templates diferentes y props.</li>
<li>Transportación dentro de la <strong>Ciudad de México</strong>.</li>
</ul>
Seleccionar
</div>
</div>
<div class="pricing-table">
<div class="pricing-card">
<h3 class="pricing-card-header">Personalizado</h3>
<div class="price">Contáctanos</div>
<ul>
<li><strong>1</strong> Booth 360°.</li>
<li><strong>?</strong> horas de servicio.</li>
<li><strong>2</strong> personas de Staff.</li>
<li>Videos y fotos<strong> ilimitados</strong> durante todo el servicio.</li>
<li><strong>?</strong> templates diferentes y props.</li>
<li>Transportación dentro de la <strong>Ciudad de México</strong>.</li>
</ul>
Seleccionar
</div>
</div> <!-- CABINA 360 -->
<br>
<br>
<br>
<h2 style="text-align:center;">Magic Mirror Booth</h2>
<div class="pricing-table">
<div class="pricing-card" id="mirror">
<h3 class="pricing-card-header">Básico</h3>
<div class="price"><sup>$</sup>5,900 MXN</div>
<ul>
<li><strong>1</strong> Booth Magic Mirror.</li>
<li><strong>2</strong> horas de servicio.</li>
<li><strong>2</strong> personas de Staff.</li>
<li>Fotos<strong> ilimitadas</strong> durante todo el servicio.</li>
<li><strong>2</strong> templates diferentes y props.</li>
<li>Transportación dentro de la <strong>Ciudad de México</strong>.</li>
</ul>
Seleccionar
</div>
</div>
<div class="pricing-table">
<div class="pricing-card">
<h3 class="pricing-card-header">Clásico</h3>
<div class="price"><sup>$</sup>7,400 MXN</div>
<ul>
<li><strong>1</strong> Booth Magic Mirror.</li>
<li><strong>3</strong> horas de servicio.</li>
<li><strong>2</strong> personas de Staff.</li>
<li>Fotos<strong> ilimitadas</strong> durante todo el servicio.</li>
<li><strong>4</strong> templates diferentes y props.</li>
<li>Transportación dentro de la <strong>Ciudad de México</strong>.</li>
</ul>
Seleccionar
</div>
</div>
<div class="pricing-table">
<div class="pricing-card">
<h3 class="pricing-card-header">Prémium</h3>
<div class="price"><sup>$</sup>9,900 MXN</div>
<ul>
<li><strong>1</strong> Booth Magic Mirror.</li>
<li><strong>5</strong> horas de servicio.</li>
<li><strong>2</strong> personas de Staff.</li>
<li>Fotos<strong> ilimitadas</strong> durante todo el servicio.</li>
<li><strong>6</strong> templates diferentes y props.</li>
<li>Transportación dentro de la <strong>Ciudad de México</strong>.</li>
</ul>
Seleccionar
</div>
</div>
<div class="pricing-table">
<div class="pricing-card">
<h3 class="pricing-card-header">Personalizado</h3>
<div class="price">Contáctanos</div>
<ul>
<li><strong>1</strong> Booth Magic Mirror.</li>
<li><strong>?</strong> horas de servicio.</li>
<li><strong>2</strong> personas de Staff.</li>
<li>Fotos<strong> ilimitados</strong> durante todo el servicio.</li>
<li><strong>?</strong> templates diferentes y props.</li>
<li>Transportación dentro de la <strong>Ciudad de México</strong>.</li>
</ul>
Seleccionar
</div>
</div>
</div>
`
`
.pricing-table{
display: flex;
flex-wrap: wrap;
justify-content: space-around;
width: min(1600px, 100%);
}
.pricing-card{
flex: 1;
max-width: 360px;
background-color: #17173d;
margin: 20px 10px;
text-align: center;
cursor: pointer;
overflow: hidden;
color: #f9f9f9;
transition: .3s linear;
border-radius: 20px;
}
.pricing-card-header{
background-color: var(--majorelle-blue);
display: inline-block;
color: #fff;
padding: 12px 30px;
border-radius: 0 0 20px 20px;
font-size: 16px;
text-transform: uppercase;
font-weight: 600;
transition: .4s linear;
}
.pricing-card:hover .pricing-card-header{
box-shadow: 0 0 0 26em var(--majorelle-blue);
}
.price{
font-size: 35px;
color: var(--majorelle-blue);
margin: 40px 0;
transition: .2s linear;
}
.price sup{
font-size: 22px;
font-weight: 700;
}
.pricing-card:hover ,.pricing-card:hover .price{
color: #fff;
}
.pricing-card li{
font-size: 16px;
padding: 10px 0;
text-transform: uppercase;
}
.order-btn{
display: inline-block;
margin-bottom: 40px;
margin-top: 80px;
border: 2px solid var(--majorelle-blue);
color: var(--majorelle-blue);
padding: 18px 40px;
border-radius: 8px;
text-transform: uppercase;
font-weight: 500;
transition: .3s linear;
}
.order-btn:hover{
background-color: var(--majorelle-blue);
color: #fff;
}
#media screen and (max-width:1100px) {
.pricing-card{
flex: 50%;
}
}
`
you just didn't close the first and the second #media query. that's it.
#media (min-width: 450px) {
/**
* HERO
*/
.hero-form { position: relative; }
.email-field {
margin-bottom: 0;
padding-right: 155px;
}
.hero .btn-primary {
position: absolute;
top: 5px;
right: 5px;
padding-block: 12.5px;
}
.hero-ctc .btn-primary {
position: absolute;
top: 5px;
right: 5px;
padding-block: 12.5px;
}
} /* this wasn't closed */
#media (min-width: 450px) {
/**
* HERO
*/
.hero-form { position: relative; }
.email-field {
margin-bottom: 0;
padding-right: 155px;
}
.hero .btn-primary {
position: absolute;
top: 5px;
right: 5px;
padding-block: 12.5px;
}
.hero-ctc .btn-primary {
position: absolute;
top: 5px;
right: 5px;
padding-block: 12.5px;
}
} /* this wasn't closed */
Take a look in your css.
You have...
#media (min-width: 450px) {
/**
* HERO
*/
.hero-form { position: relative; }
.email-field {
margin-bottom: 0;
padding-right: 155px;
}
.hero-ctc .btn-primary {
position: absolute;
top: 5px;
right: 5px;
padding-block: 12.5px;
}
/**
* ABOUT
*/
.about-card .card-text {
max-width: 300px;
margin-inline: auto;
}
}
... as your smallest minimum width where styles are applied for mobile devices. (by the way, you have that exact same #media definition for the minimum width of 450 pixels case in there three times for some reason... perhaps a bad copy and paste?)
Then, if you look at the dimensions in the responsive viewport as shown in the provided screenshot, you can see the width is 414. If you were to drag that viewport screen to the right or set the width to 450 or greater, the style will show.
If you find it necessary, you can define smaller minimum width dimension cases in your css, being mindful that your definitions start with the smallest and work up to the largest.
You have a couple of copy and paste CSS media queries from line 791 to 871.
The majority of css classes ans attributes are the same.
But I think the problem is in you style.css line 819 you open a #media (min-width: 450px) but you don't close in line 844.
You forgot to close braces here
That should work like a charm
Mobile view with close braces modification
Related
I am trying to get an icon to be placed to the left of the text as in the image. Right now for some reason it is on top of the text. The icon are inside tabs with text and I want the icons to change for each tab. Even if I change the margins, they do not move.
Senconly, I have an image and text in the header and it looks fine in google chrome but when I change browsers they pile to the left. They are currently placed in the center by adjusting the margins but maybe a flex display or grid will make them look centered in every browser and be cleaner? could I do this?
Thanks
<header>
<div class="container_header">
<img ID="foto_perfil" src="iconos/perfil.png" alt="Foto de perfil">
<h1 class="Nombre">Daniela Sucunza</h1>
<p class="titulo">Licenciada en Administración</p>
<p class="titulo">Programadora Front End</p>
</div>
</main>
</header>
<body>
<script src="function.js"></script>
<div class="tab">
<button class="tablinks" onclick="openCity(event, 'Acerca')">Acerca de mi</button>
<button class="tablinks" onclick="openCity(event, 'Experiencia')">Experiencia</button>
<button class="tablinks" onclick="openCity(event, 'Educacion')">Educación</button>
<button class="tablinks" onclick="openCity(event, 'Habilidades')">Habilidades</button>
</div>
<div id="demo">
<div id="Acerca" class="tabcontent" style=display:block>
<i class="fa-regular fa-user"></i>
<p><img class="bloque__icono" src="iconos/double.arrow.png" alt="arrow">Profesional ambicioso y con formación en recursos humanos, que busca un puesto de principiante en el que pueda utilizar mejor mis habilidades y mi pasión.<br>
<img class="bloque__icono" src="iconos/double.arrow.png" alt="arrow">Ambicioso y capaz de trabajar independientemente o en equipo. Comprometido a establecer y mantener un ambiente de trabajo positivo para todos los empleados.<br>
<img class="bloque__icono" src="iconos/double.arrow.png" alt="arrow">Como esta área complementa mis estudios, estoy ansioso por adquirir más experiencia en este campo. Por esta razón, estoy buscando una compañía dispuesta a ofrecerme una ubicación entre sus desarrolladores. A cambio, ofrecería mi todo compromiso y sería una adición agradable y amigable para su equipo.<br>
<img class="bloque__icono" src="iconos/double.arrow.png" alt="arrow">Por lo tanto, actualmente estoy buscando un trabajo o una pasantía como un front-end desarrollador.</p></p>
</div>
<div id="Experiencia" class="tabcontent" style=display:none>
<p><h3>Asistente de Recursos Humanos</h3>
Noviembre, 2015- Octubre, 2020<br>
<img class="bloque__icono" src="iconos/double.arrow.png" alt="arrow">Creación de un registro de cumplimiento para uso de la gerencia cada mes.<br>
<img class="bloque__icono" src="iconos/double.arrow.png" alt="arrow">Asistencia en el mantenimiento de todos los archivos en papel para el departamento de RRHH.<br>
<img class="bloque__icono" src="iconos/double.arrow.png" alt="arrow">Apoyo en la creación de documentación para todos los nuevos empleados, y siguió creando archivos conforme al protocolo de RRHH.<br>
<h3>Asistente de Recepción<br></h3>
Julio 2013- Junio 2015<br>
<img class="bloque__icono" src="iconos/double.arrow.png" alt="arrow">Apoyo en la actualización de toda la información de beneficios, a la vez que ampliaba los conocimientos relacionados con los beneficios para los empleados.<br>
<img class="bloque__icono" src="iconos/double.arrow.png" alt="arrow">Conducta profesional, agradable y trabajadora en el día a día.</p>
</div>
<div id="Educacion" class="tabcontent" style=display:none>
<p> <h3>Licenciatura en Recusos Humanos</h3>
Febrero 2009 - Octubre, 2013<br>
Graduado magna cum laude. Escritor principal de la revista universitaria El León.<br>
<h3>Master en Ciencia Datos</h3>
Febrero 2015- Octubre, 2017<br>
Universidad Nacional
</p>
</div>
<div id="Habilidades" class="tabcontent" style=display:none>
<h3>Habilidades</h3>
<p><img class="bloque__icono" src="iconos/double.arrow.png" alt="arrow">Ingles Avanzado<br>
<img class="bloque__icono" src="iconos/double.arrow.png" alt="arrow">Portugues Intermedio<br>
<img class="bloque__icono" src="iconos/double.arrow.png" alt="arrow">SQL <br>
<img class="bloque__icono" src="iconos/double.arrow.png" alt="arrow">Power BI <br>
<img class="bloque__icono" src="iconos/double.arrow.png" alt="arrow">Photoshop<br>
<img class="bloque__icono" src="iconos/double.arrow.png" alt="arrow">Python</p>
</div>
</div>
</body>
<footer>
</footer>
</html>
:root{
--primario: #E8F3D6;
--Oscuro: #A0E4CB;
--blanco: #fff;
--Negro: #000;
--FuentePrincipal: 'Jost', sans-serif;
--FuenteTitulo: 'DM Serif Display', serif;
}
/*GENERALES*/
html {
box-sizing: border-box;
}
body{
background-color: white;
color: black;
margin: auto;
}
/* HEADER*/
#foto_perfil{
border-radius: 100px;
float: left;
width:170px;
height:170px;
margin-left: 470px;
margin-right: 70px;
margin-top: 15px;
opacity: 1.0;
}
#foto_perfil:hover {
opacity: 0.7;
}
.container_header {
top: 0%;
justify-content: center;
flex-direction: column;
align-items: center;
text-align: left;
width: 100%;
height: 200px;
background: var(--primario);
}
.Nombre{
font-family: var(--FuenteTitulo);
font-weight:200;
margin-right: 1rem;
color: black;
font-size: 35px;
padding-top: 25px;
}
.titulo{
font-family: var(--FuentePrincipal);
margin-right: 1rem;
font-size: 20px;
font-weight: bold;
font-style: italic;
}
#demo {
font-family: var(--FuentePrincipal);
line-height: 35px;
margin-top: 1rem;
font-size: large;
text-align: justify;
margin-left: 25rem;
margin-right: 10rem;
white-space: wrap;
}
/* button*/
.navbar {
width: 100%;
background-color: #555;
overflow: auto;
}
.tab button {
text-align: center;
background-color: inherit;
float: center;
border: none;
outline: none;
cursor: pointer;
padding: 14px 16px;
transition: 0.3s;
font-size: 17px;
float: center;
text-decoration: none;
width: 22%;
margin-top: 1rem;
margin-left: 2rem;
filter: drop-shadow(0px 4px 4p
x rgba(0, 0, 0, 0.15));
border-radius: 8px;;
background-color: white;
color: black;
border: 2px solid var(--primario);
}
.tab button:hover {
background-color: var(--Oscuro);
color: black;
border: 2px solid var(--Oscuro)
}
.tab button.active {
background-color: #A0E4CB;
}
.tabcontent {
display: none;
padding: 6px 12px;
-webkit-animation: fadeEffect 1s;
animation: fadeEffect 1s;
}
#-webkit-keyframes fadeEffect {
from {opacity: 0;}
to {opacity: 1;}
}
#keyframes fadeEffect {
from {opacity: 0;}
to {opacity: 1;}
}
/* ICONOS*/
img {
width: 15px;
height:15px;
}
/*TABS*/
h3{
font-weight: bolder;
font-style: italic;
}
/* FOOTER*/
footer{
position: fixed;
left: 0;
bottom: 0;
width: 100%;
text-align: center;
background-color: var(--primario);
/** margin-top: 2rem;**/
}
.fa-brands {
color: var(--Negro);
padding: 20px;
font-size: 30px;
width: 30px;
height: 30px;
text-align: center;
text-decoration: none;
padding: 16px 32px;
margin: 15px 2px;
}
.fa:hover {
opacity: 0.7;
}
.fa-regular{
padding: 20px;
font-size: 30px;
width: 30px;
height: 30px;
text-align: right;
text-decoration: none;
padding: 16px 32px;
margin-right: 0% ;
}
function openCity(evt, cityName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(cityName).style.display = "block";
evt.currentTarget.className += " active";
}
current page
model- expected outcome
modifying margins, adding display.grid, display-flex
Yes flex will do. I've added flex to the header and all of the tabs.
function openCity(event, city) {
const tabs = document.querySelectorAll(".tabcontent")
tabs.forEach(tab => tab.style['display'] = 'none')
document.getElementById(city).style['display'] = 'flex';
}
:root {
--primario: #E8F3D6;
--Oscuro: #A0E4CB;
--blanco: #fff;
--Negro: #000;
--FuentePrincipal: 'Jost', sans-serif;
--FuenteTitulo: 'DM Serif Display', serif;
}
/*GENERALES*/
html {
box-sizing: border-box;
}
body {
background-color: white;
color: black;
margin: auto;
}
/* HEADER*/
#foto_perfil {
border-radius: 100px;
width: 170px;
height: 170px;
margin-left: 470px;
margin-right: 70px;
margin-top: 15px;
opacity: 1.0;
}
#foto_perfil:hover {
opacity: 0.7;
}
.container_header {
display: flex;
justify-content: center;
align-items: center;
text-align: left;
width: 100%;
height: 200px;
background: var(--primario);
}
.Nombre {
font-family: var(--FuenteTitulo);
font-weight: 200;
margin-right: 1rem;
color: black;
font-size: 35px;
padding-top: 25px;
}
.titulo {
font-family: var(--FuentePrincipal);
margin-right: 1rem;
font-size: 20px;
font-weight: bold;
font-style: italic;
}
#demo {
font-family: var(--FuentePrincipal);
line-height: 35px;
margin-top: 1rem;
font-size: large;
text-align: justify;
margin-left: 25rem;
margin-right: 10rem;
white-space: wrap;
}
/* button*/
.navbar {
width: 100%;
background-color: #555;
overflow: auto;
}
.tab button {
text-align: center;
background-color: inherit;
float: center;
border: none;
outline: none;
cursor: pointer;
padding: 14px 16px;
transition: 0.3s;
font-size: 17px;
text-decoration: none;
width: 22%;
margin-top: 1rem;
margin-left: 2rem;
filter: drop-shadow(0px 4px 4p x rgba(0, 0, 0, 0.15));
border-radius: 8px;
background-color: white;
color: black;
border: 2px solid var(--primario);
}
.tab button:hover {
background-color: var(--Oscuro);
color: black;
border: 2px solid var(--Oscuro)
}
.tab button.active {
background-color: #A0E4CB;
}
.tabcontent {
display: none;
padding: 6px 12px;
-webkit-animation: fadeEffect 1s;
animation: fadeEffect 1s;
}
#-webkit-keyframes fadeEffect {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
#keyframes fadeEffect {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* ICONOS*/
img {
width: 15px;
height: 15px;
}
/*TABS*/
h3 {
font-weight: bolder;
font-style: italic;
}
#demo>* {
display: flex;
justify-content: center;
align-items: center;
}
/* FOOTER*/
footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
text-align: center;
background-color: var(--primario);
/** margin-top: 2rem;**/
}
.fa-brands {
color: var(--Negro);
padding: 20px;
font-size: 30px;
width: 30px;
height: 30px;
text-align: center;
text-decoration: none;
padding: 16px 32px;
margin: 15px 2px;
}
.fa:hover {
opacity: 0.7;
}
.fa-regular {
padding: 20px;
font-size: 30px;
width: 30px;
height: 30px;
text-align: right;
text-decoration: none;
padding: 16px 32px;
margin-right: 0%;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css" rel="stylesheet" />
<header>
<div class="container_header">
<img ID="foto_perfil" src="iconos/perfil.png" alt="Foto de perfil">
<div class="info">
<h1 class="Nombre">Daniela Sucunza</h1>
<p class="titulo">Licenciada en Administración</p>
<p class="titulo">Programadora Front End</p>
</div>
</div>
</header>
<script src="function.js"></script>
<div class="tab">
<button class="tablinks" onclick="openCity(event, 'Acerca')">Acerca de mi</button>
<button class="tablinks" onclick="openCity(event, 'Experiencia')">Experiencia</button>
<button class="tablinks" onclick="openCity(event, 'Educacion')">Educación</button>
<button class="tablinks" onclick="openCity(event, 'Habilidades')">Habilidades</button>
</div>
<div id="demo">
<div id="Acerca" class="tabcontent" style=display:flex>
<i class="fa-regular fa-user"></i>
<p>
<img class="bloque__icono" src="https://w7.pngwing.com/pngs/213/485/png-transparent-arrow-double-right-arrows-icon-thumbnail.png" alt="arrow">Profesional ambicioso y con formación en recursos humanos, que busca un puesto de principiante en el que
pueda utilizar mejor mis habilidades y mi pasión.<br>
<img class="bloque__icono" src="https://w7.pngwing.com/pngs/213/485/png-transparent-arrow-double-right-arrows-icon-thumbnail.png" alt="arrow">Ambicioso y capaz de trabajar independientemente o en equipo. Comprometido a establecer y mantener un ambiente
de trabajo positivo para todos los empleados.<br>
<img class="bloque__icono" src="https://w7.pngwing.com/pngs/213/485/png-transparent-arrow-double-right-arrows-icon-thumbnail.png" alt="arrow">Como esta área complementa mis estudios, estoy ansioso por adquirir más experiencia en este campo. Por
esta razón, estoy buscando una compañía dispuesta a ofrecerme una ubicación entre sus desarrolladores. A cambio, ofrecería mi todo compromiso y sería una adición agradable y amigable para su equipo.<br>
<img class="bloque__icono" src="https://w7.pngwing.com/pngs/213/485/png-transparent-arrow-double-right-arrows-icon-thumbnail.png" alt="arrow">Por lo tanto, actualmente estoy buscando un trabajo o una pasantía como un front-end desarrollador.
</p>
</div>
<div id="Experiencia" class="tabcontent" style=display:none>
<h3>Asistente de Recursos Humanos</h3>
Noviembre, 2015- Octubre, 2020<br>
<img class="bloque__icono" src="https://w7.pngwing.com/pngs/213/485/png-transparent-arrow-double-right-arrows-icon-thumbnail.png" alt="arrow">Creación de un registro de cumplimiento para uso de la gerencia cada mes.<br>
<img class="bloque__icono" src="https://w7.pngwing.com/pngs/213/485/png-transparent-arrow-double-right-arrows-icon-thumbnail.png" alt="arrow">Asistencia en el mantenimiento de todos los archivos en papel para el departamento de RRHH.<br>
<img class="bloque__icono" src="https://w7.pngwing.com/pngs/213/485/png-transparent-arrow-double-right-arrows-icon-thumbnail.png" alt="arrow">Apoyo en la creación de documentación para todos los nuevos empleados, y siguió creando archivos conforme
al protocolo de RRHH.<br>
<h3>Asistente de Recepción<br></h3>
Julio 2013- Junio 2015<br>
<img class="bloque__icono" src="https://w7.pngwing.com/pngs/213/485/png-transparent-arrow-double-right-arrows-icon-thumbnail.png" alt="arrow">Apoyo en la actualización de toda la información de beneficios, a la vez que ampliaba los conocimientos relacionados
con los beneficios para los empleados.<br>
<img class="bloque__icono" src="https://w7.pngwing.com/pngs/213/485/png-transparent-arrow-double-right-arrows-icon-thumbnail.png" alt="arrow">Conducta profesional, agradable y trabajadora en el día a día.
</div>
<div id="Educacion" class="tabcontent" style=display:none>
<h3>Licenciatura en Recusos Humanos</h3>
Febrero 2009 - Octubre, 2013<br> Graduado magna cum laude. Escritor principal de la revista universitaria El León.<br>
<h3>Master en Ciencia Datos</h3>
Febrero 2015- Octubre, 2017<br> Universidad Nacional
</div>
<div id="Habilidades" class="tabcontent" style=display:none>
<h3>Habilidades</h3>
<p>
<img class="bloque__icono" src="https://w7.pngwing.com/pngs/213/485/png-transparent-arrow-double-right-arrows-icon-thumbnail.png" alt="arrow">Ingles Avanzado<br>
<img class="bloque__icono" src="https://w7.pngwing.com/pngs/213/485/png-transparent-arrow-double-right-arrows-icon-thumbnail.png" alt="arrow">Portugues Intermedio<br>
<img class="bloque__icono" src="https://w7.pngwing.com/pngs/213/485/png-transparent-arrow-double-right-arrows-icon-thumbnail.png" alt="arrow">SQL <br>
<img class="bloque__icono" src="https://w7.pngwing.com/pngs/213/485/png-transparent-arrow-double-right-arrows-icon-thumbnail.png" alt="arrow">Power BI <br>
<img class="bloque__icono" src="https://w7.pngwing.com/pngs/213/485/png-transparent-arrow-double-right-arrows-icon-thumbnail.png" alt="arrow">Photoshop<br>
<img class="bloque__icono" src="https://w7.pngwing.com/pngs/213/485/png-transparent-arrow-double-right-arrows-icon-thumbnail.png" alt="arrow">Python
</p>
</div>
</div>
<footer>
</footer>
My footer doesn't stick to the bottom when the content of the page is very little, I tried using:
position:absolute;
and
bottom:0;
but it seems to stick, but when I add too much content it goes "under" the footer that remains in the middle of the page.
By under I mean that the text passes under the footer that remains in almost the middle of the page and surpasses it, if needed I can send some pictures of the problem, thanks a lot for your time!
this is the HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/src/app/footer/footer.component.css"> <!--import css footer-->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
</head>
<body>
<!--parte footer dell'html-->
<footer class="footer">
<div class="flex-wrapper">
<div class="container">
<div class="row">
<div class="footer-col">
<div class="content">
<a href="#"> <!--i link da collegare vanno dove sono presenti gli #-->
<img src="https://i.imgur.com/1yvwx9I.png" >
</a>
</div>
</div>
<div class="footer-col">
<h4>Azienda</h4> <!--titolo-->
<ul>
<li>Chi Siamo</li> <!--elenco degli elementi-->
<li>Contattaci</li>
<li>Placeholder</li>
<li>PlaceHolder</li>
</ul>
</div>
<div class="footer-col">
<h4>Aiuto</h4>
<ul>
<li>FAQ</li>
<li>Consegne</li>
<li>Reso</li>
<li>Informatica privacy</li>
</ul>
</div>
<div class="footer-col">
<h4>Seguici su</h4>
<div class="social-links">
<i class="fab fa-facebook-f"></i> <!--icone dei social-->
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-linkedin-in"></i>
</div>
</div>
</div>
</div>
</div>
</footer>
</body>
</html>
this is the CSS
#import url('https://fonts.googleapis.com/css2?family=Poppins:wght#300;400;500;600;700&display=swap');
body {
/* fonto e grandezza font*/
line-height: 1;
font-family: 'Poppins', sans-serif;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container {
width: 100%;
margin: 0 auto;
}
.row {
/*si occupa delle righe, accomoda lo spostamento dell'elenco con il dimensionamento della pagina */
display: flex;
flex-wrap: wrap;
}
ul {
list-style: none;
}
.footer {
/* solamente il colore di background del footer e lo spazio tra gli elementi */
background-color: #24262b;
padding: 20px 0;
}
.footer-col {
/* si occupa delle colonne e del loro ridimensionamento */
width: 25%;
padding: 0;
}
.footer-col h4 {
/*stabilisco la grandezza del font e del colore dei titoli */
font-size: 25px;
color: #ffffff;
text-transform: capitalize;
margin-bottom: 35px;
font-weight: 500;
position: relative;
}
.footer-col h4::before {
/* barra rossa sotto ai titoli */
content: '';
position: absolute;
left: 0;
bottom: -10px;
background-color: #e91e63;
height: 2px;
box-sizing: border-box;
width: 50px;
}
.footer-col ul li:not(:last-child) {
margin-bottom: 10px; /* spazio tra le scritte in verticale */
}
.footer-col ul li a {
/* stato degli elementi dell'elenco pre-hover, potete notare che dispongo qui "transition" cioè il tempo che ci metterà a passare allo stato dell'hover dal suo stato normale e viceversa */
font-size: 16px;
text-transform: capitalize;
color: #ffffff;
text-decoration: none;
font-weight: 300;
color: #bbbbbb;
display: block;
transition: all 0.3s ease;
}
.footer-col ul li a:hover {
/* colore e leggero spostamento quando avviene l'hover (cioè quando ci passa sopra il mouse) */
color: #ffffff;
padding-left: 8px;
}
.footer-col .social-links a {
/* stesso meccaniscmo dei font, qui però inserisco il background-color per il cambiamento del color (color -> background-color)*/
display: inline-block;
height: 40px;
width: 40px;
background-color: rgba(255, 255, 255, 0.2);
margin: 0 10px 10px 0;
text-align: center;
line-height: 40px;
border-radius: 50%;
color: #ffffff;
transition: all 0.5s ease;
}
.footer-col .social-links a:hover {
color: #24262b;
background-color: #ffffff;
}
.content {
display: block;
padding: 10px;
margin: 15px auto;
text-align: center;
font: 25px Georgia, "Times New Roman", Times, serif;
font-size: 14px;
width: 300px;
display: flex;
}
.foot {
display: inline;
line-height: 70px;
}
/* dove si trova il logo, lo inizializzo con un filtro grigio e una transizione di 0.6, uso webkit per la scala di grigio (e anche la transizione solo per webkit), la scala di grigio viene usata perché rende il contrasto con l'hover molto più bello */
.content img {
height: 150px;
width: 150px;
float: left;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-webkit-transition: all .6s ease-in-out;
transition: 0.6s;
}
/* hover del logo */
.content img:hover {
filter: invert(400%);
filter: brightness(4);
-webkit-filter: grayscale(-100);
-webkit-transform: scale(1.10);
}
/* tiene il footer esteso evitando gli spazi sui lati */
footer {
position: absolute;
/* temporaneo, di solito 0px o togli */
right: 0px;
left: 0px;
}
This is what happens when i add bottom:0px;
The best way to make sure your footer always sticks to the bottom is to use a flexbox for your body tag.
HTML & CSS Code Snippet
#import url('https://fonts.googleapis.com/css2?family=Poppins:wght#300;400;500;600;700&display=swap');
body {
/* fonto e grandezza font*/
line-height: 1;
font-family: 'Poppins', sans-serif;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* tiene il footer esteso evitando gli spazi sui lati */
html, body {
height: 100%;
}
body {
display: flex;
flex-direction: column;
}
.content {
/* flex: 1 0 auto; */
flex-direction: column;
}
.footer {
flex-shrink: 0;
}
.container {
width: 100%;
margin: 0 auto;
}
.row {
/*si occupa delle righe, accomoda lo spostamento dell'elenco con il dimensionamento della pagina */
display: flex;
flex-wrap: wrap;
}
ul {
list-style: none;
}
.footer {
/* solamente il colore di background del footer e lo spazio tra gli elementi */
background-color: #24262b;
padding: 20px 0;
}
.footer-col {
/* si occupa delle colonne e del loro ridimensionamento */
width: 25%;
padding: 0;
}
.footer-col h4 {
/*stabilisco la grandezza del font e del colore dei titoli */
font-size: 25px;
color: #ffffff;
text-transform: capitalize;
margin-bottom: 35px;
font-weight: 500;
position: relative;
}
.footer-col h4::before {
/* barra rossa sotto ai titoli */
content: '';
position: absolute;
left: 0;
bottom: -10px;
background-color: #e91e63;
height: 2px;
box-sizing: border-box;
width: 50px;
}
.footer-col ul li:not(:last-child) {
margin-bottom: 10px; /* spazio tra le scritte in verticale */
}
.footer-col ul li a {
/* stato degli elementi dell'elenco pre-hover, potete notare che dispongo qui "transition" cioè il tempo che ci metterà a passare allo stato dell'hover dal suo stato normale e viceversa */
font-size: 16px;
text-transform: capitalize;
color: #ffffff;
text-decoration: none;
font-weight: 300;
color: #bbbbbb;
display: block;
transition: all 0.3s ease;
}
.footer-col ul li a:hover {
/* colore e leggero spostamento quando avviene l'hover (cioè quando ci passa sopra il mouse) */
color: #ffffff;
padding-left: 8px;
}
.footer-col .social-links a {
/* stesso meccaniscmo dei font, qui però inserisco il background-color per il cambiamento del color (color -> background-color)*/
display: inline-block;
height: 40px;
width: 40px;
background-color: rgba(255, 255, 255, 0.2);
margin: 0 10px 10px 0;
text-align: center;
line-height: 40px;
border-radius: 50%;
color: #ffffff;
transition: all 0.5s ease;
}
.footer-col .social-links a:hover {
color: #24262b;
background-color: #ffffff;
}
.content {
display: block;
padding: 10px;
margin: 15px auto;
text-align: center;
font: 25px Georgia, "Times New Roman", Times, serif;
font-size: 14px;
width: 300px;
display: flex;
}
.foot {
display: inline;
line-height: 70px;
}
/* dove si trova il logo, lo inizializzo con un filtro grigio e una transizione di 0.6, uso webkit per la scala di grigio (e anche la transizione solo per webkit), la scala di grigio viene usata perché rende il contrasto con l'hover molto più bello */
.content img {
height: 150px;
width: 150px;
float: left;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-webkit-transition: all .6s ease-in-out;
transition: 0.6s;
}
/* hover del logo */
.content img:hover {
filter: invert(400%);
filter: brightness(4);
-webkit-filter: grayscale(-100);
-webkit-transform: scale(1.10);
}
<body>
<!--parte footer dell'html-->
<div class="content">
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
<p>Demo Content</p>
</div>
<footer class="footer">
<div class="flex-wrapper">
<div class="container">
<div class="row">
<div class="footer-col">
<div class="content">
<a href="#"> <!--i link da collegare vanno dove sono presenti gli #-->
<img src="https://i.imgur.com/1yvwx9I.png" >
</a>
</div>
</div>
<div class="footer-col">
<h4>Azienda</h4> <!--titolo-->
<ul>
<li>Chi Siamo</li> <!--elenco degli elementi-->
<li>Contattaci</li>
<li>Placeholder</li>
<li>PlaceHolder</li>
</ul>
</div>
<div class="footer-col">
<h4>Aiuto</h4>
<ul>
<li>FAQ</li>
<li>Consegne</li>
<li>Reso</li>
<li>Informatica privacy</li>
</ul>
</div>
<div class="footer-col">
<h4>Seguici su</h4>
<div class="social-links">
<i class="fab fa-facebook-f"></i> <!--icone dei social-->
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-linkedin-in"></i>
</div>
</div>
</div>
</div>
</div>
</footer>
</body>
You could even add a header above that or more stuff below. The trick with flexbox is either:
flex: 1 on the child you want to grow to fill the space (the
content, in our case).
or, margin-top: auto to push the child away as far as it will go
from the neighbor (or whichever direction margin is needed).
To check more ways for this purpose you can check this article "https://css-tricks.com/couple-takes-sticky-footer/"
Here is the link for Codepen as well
So I wanted my footer to cover the entire length of the page and stick to the bottom of the page, getting pushed down if some content gets added, what happened is, on codepen everything works perfectly, on Angular (14), it does not cover the length of the page, instead, it leaves some space on the left, right and bottom and I don't know why I will attach the code
#import url('https://fonts.googleapis.com/css2?family=Poppins:wght#300;400;500;600;700&display=swap');
body {
/* fonto e grandezza font*/
line-height: 1;
font-family: 'Poppins', sans-serif;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* tiene il footer esteso evitando gli spazi sui lati */
html,
body {
height: 100%;
}
body {
display: flex;
flex-direction: column;
}
.content {
/* flex: 1 0 auto; */
flex-direction: column;
}
.footer {
flex-shrink: 0;
}
.container {
width: 100%;
margin: 0 auto;
}
.row {
/*si occupa delle righe, accomoda lo spostamento dell'elenco con il dimensionamento della pagina */
display: flex;
flex-wrap: wrap;
}
ul {
list-style: none;
}
.footer {
/* solamente il colore di background del footer e lo spazio tra gli elementi */
background-color: #24262b;
padding: 20px 0;
}
.footer-col {
/* si occupa delle colonne e del loro ridimensionamento */
width: 25%;
padding: 0;
}
.footer-col h4 {
/*stabilisco la grandezza del font e del colore dei titoli */
font-size: 25px;
color: #ffffff;
text-transform: capitalize;
margin-bottom: 35px;
font-weight: 500;
position: relative;
}
.footer-col h4::before {
/* barra rossa sotto ai titoli */
content: '';
position: absolute;
left: 0;
bottom: -10px;
background-color: #e91e63;
height: 2px;
box-sizing: border-box;
width: 50px;
}
.footer-col ul li:not(:last-child) {
margin-bottom: 10px;
/* spazio tra le scritte in verticale */
}
.footer-col ul li a {
/* stato degli elementi dell'elenco pre-hover, potete notare che dispongo qui "transition" cioè il tempo che ci metterà a passare allo stato dell'hover dal suo stato normale e viceversa */
font-size: 16px;
text-transform: capitalize;
color: #ffffff;
text-decoration: none;
font-weight: 300;
color: #bbbbbb;
display: block;
transition: all 0.3s ease;
}
.footer-col ul li a:hover {
/* colore e leggero spostamento quando avviene l'hover (cioè quando ci passa sopra il mouse) */
color: #ffffff;
padding-left: 8px;
}
.footer-col .social-links a {
/* stesso meccaniscmo dei font, qui però inserisco il background-color per il cambiamento del color (color -> background-color)*/
display: inline-block;
height: 40px;
width: 40px;
background-color: rgba(255, 255, 255, 0.2);
margin: 0 10px 10px 0;
text-align: center;
line-height: 40px;
border-radius: 50%;
color: #ffffff;
transition: all 0.5s ease;
}
.footer-col .social-links a:hover {
color: #24262b;
background-color: #ffffff;
}
.content {
display: block;
padding: 10px;
margin: 15px auto;
text-align: center;
font: 25px Georgia, "Times New Roman", Times, serif;
font-size: 14px;
width: 300px;
display: flex;
}
.foot {
display: inline;
line-height: 70px;
}
/* dove si trova il logo, lo inizializzo con un filtro grigio e una transizione di 0.6, uso webkit per la scala di grigio (e anche la transizione solo per webkit), la scala di grigio viene usata perché rende il contrasto con l'hover molto più bello */
.content img {
height: 150px;
width: 150px;
float: left;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-webkit-transition: all .6s ease-in-out;
transition: 0.6s;
}
/* hover del logo */
.content img:hover {
filter: invert(400%);
filter: brightness(4);
-webkit-filter: grayscale(-100);
-webkit-transform: scale(1.10);
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/src/app/footer/footer.component.css">
<!--import css footer-->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
</head>
<body>
<!--parte footer dell'html-->
<!--parte footer dell'html-->
<div class="content">
<div>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
</div>
<div>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
</div>
<div>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
</div>
<div>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
</div>
</div>
<footer class="footer">
<div class="flex-wrapper">
<div class="container">
<div class="row">
<div class="footer-col">
<div class="content">
<a href="#">
<!--i link da collegare vanno dove sono presenti gli #-->
<img src="https://i.imgur.com/1yvwx9I.png">
</a>
</div>
</div>
<div class="footer-col">
<h4>Azienda</h4>
<!--titolo-->
<ul>
<li>Chi Siamo</li>
<!--elenco degli elementi-->
<li>Contattaci</li>
<li>Placeholder</li>
<li>PlaceHolder</li>
</ul>
</div>
<div class="footer-col">
<h4>Aiuto</h4>
<ul>
<li>FAQ</li>
<li>Consegne</li>
<li>Reso</li>
<li>Informatica privacy</li>
</ul>
</div>
<div class="footer-col">
<h4>Seguici su</h4>
<div class="social-links">
<i class="fab fa-facebook-f"></i>
<!--icone dei social-->
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-linkedin-in"></i>
</div>
</div>
</div>
</div>
</div>
</footer>
</body>
</html>
and the image of the problem (please don't mind the random text, it was for testing)
OH! And also I tried setting right left and bottom at 0 but to no avail.
I didn't exactly get what problem you are facing based on the current version of your question. However, I assume that it is regarding space below your footer and content when you have less content.
Since, you are making the body of the html a flex, you can simply add a justification to accommodate a space in between content and footer by:
body {
...
justify-content: space-between;
}
If you are concerned about the space on left and right, may be there is some margin defined somewhere which I cannot see on this snippet.
#import url('https://fonts.googleapis.com/css2?family=Poppins:wght#300;400;500;600;700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
/* fonto e grandezza font*/
line-height: 1;
font-family: 'Poppins', sans-serif;
display: flex;
flex-direction: column;
justify-content: space-between;
}
/* tiene il footer esteso evitando gli spazi sui lati */
html,
body {
height: 100%;
}
.content {
/* flex: 1 0 auto; */
flex-direction: column;
}
.footer {
flex-shrink: 0;
}
.container {
width: 100%;
margin: 0 auto;
}
.row {
/*si occupa delle righe, accomoda lo spostamento dell'elenco con il dimensionamento della pagina */
display: flex;
flex-wrap: wrap;
}
ul {
list-style: none;
}
.footer {
/* solamente il colore di background del footer e lo spazio tra gli elementi */
background-color: #24262b;
padding: 20px 0;
}
.footer-col {
/* si occupa delle colonne e del loro ridimensionamento */
width: 25%;
padding: 0;
}
.footer-col h4 {
/*stabilisco la grandezza del font e del colore dei titoli */
font-size: 25px;
color: #ffffff;
text-transform: capitalize;
margin-bottom: 35px;
font-weight: 500;
position: relative;
}
.footer-col h4::before {
/* barra rossa sotto ai titoli */
content: '';
position: absolute;
left: 0;
bottom: -10px;
background-color: #e91e63;
height: 2px;
box-sizing: border-box;
width: 50px;
}
.footer-col ul li:not(:last-child) {
margin-bottom: 10px;
/* spazio tra le scritte in verticale */
}
.footer-col ul li a {
/* stato degli elementi dell'elenco pre-hover, potete notare che dispongo qui "transition" cioè il tempo che ci metterà a passare allo stato dell'hover dal suo stato normale e viceversa */
font-size: 16px;
text-transform: capitalize;
color: #ffffff;
text-decoration: none;
font-weight: 300;
color: #bbbbbb;
display: block;
transition: all 0.3s ease;
}
.footer-col ul li a:hover {
/* colore e leggero spostamento quando avviene l'hover (cioè quando ci passa sopra il mouse) */
color: #ffffff;
padding-left: 8px;
}
.footer-col .social-links a {
/* stesso meccaniscmo dei font, qui però inserisco il background-color per il cambiamento del color (color -> background-color)*/
display: inline-block;
height: 40px;
width: 40px;
background-color: rgba(255, 255, 255, 0.2);
margin: 0 10px 10px 0;
text-align: center;
line-height: 40px;
border-radius: 50%;
color: #ffffff;
transition: all 0.5s ease;
}
.footer-col .social-links a:hover {
color: #24262b;
background-color: #ffffff;
}
.content {
padding: 10px;
margin: 15px auto;
text-align: center;
font: 25px Georgia, "Times New Roman", Times, serif;
font-size: 14px;
width: 300px;
display: flex;
}
/* dove si trova il logo, lo inizializzo con un filtro grigio e una transizione di 0.6, uso webkit per la scala di grigio (e anche la transizione solo per webkit), la scala di grigio viene usata perché rende il contrasto con l'hover molto più bello */
.content img {
height: 150px;
width: 150px;
float: left;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-webkit-transition: all .6s ease-in-out;
transition: 0.6s;
}
/* hover del logo */
.content img:hover {
filter: invert(400%);
filter: brightness(4);
-webkit-filter: grayscale(-100);
-webkit-transform: scale(1.10);
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/src/app/footer/footer.component.css">
<!--import css footer-->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
</head>
<body>
<!--parte footer dell'html-->
<!--parte footer dell'html-->
<div class="content">
<div>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
</div>
<div>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
</div>
<div>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
</div>
<div>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
<h1>Heelo</h1>
</div>
</div>
<footer class="footer">
<div class="flex-wrapper">
<div class="container">
<div class="row">
<div class="footer-col">
<div class="content">
<a href="#">
<!--i link da collegare vanno dove sono presenti gli #-->
<img src="https://i.imgur.com/1yvwx9I.png">
</a>
</div>
</div>
<div class="footer-col">
<h4>Azienda</h4>
<!--titolo-->
<ul>
<li>Chi Siamo</li>
<!--elenco degli elementi-->
<li>Contattaci</li>
<li>Placeholder</li>
<li>PlaceHolder</li>
</ul>
</div>
<div class="footer-col">
<h4>Aiuto</h4>
<ul>
<li>FAQ</li>
<li>Consegne</li>
<li>Reso</li>
<li>Informatica privacy</li>
</ul>
</div>
<div class="footer-col">
<h4>Seguici su</h4>
<div class="social-links">
<i class="fab fa-facebook-f"></i>
<!--icone dei social-->
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-linkedin-in"></i>
</div>
</div>
</div>
</div>
</div>
</footer>
</body>
</html>
I want to show my the section "How it works" of my website like this:
https://codepen.io/carlosmr/pen/NVbbmx
The problem is that if the text is too long at the right the numbers at the left grow with it, like in number 4.
Is there a way to leave the numbers at the left and the text at the right without that problem? Thanks!
.uli {
list-style: none;
float: left;
width: 100%;
padding: 0;
}
.uli li {
padding-bottom: 80px;
float: left;
width: 100%;
position: relative;
}
.uli li span {
border-radius: 50%;
border: 1px solid #eaeaea;
width: 100px;
height: 100px;
line-height: 30px;
margin-right: 10px;
background-color: #eaeaea;
display: inline-block;
position: relative;
text-align: center;
display: table-cell;
vertical-align: middle;
color: #fff;
font-size: 3em;
}
.uli li:before {
content: '';
position: absolute;
top: 0;
width: 2px;
height: 100%;
left: 49px;
background: #eaeaea;
z-index: -1;
}
.uli li:last-child:before {
display: none;
}
.uli .ulcontent{
display: table-cell;
vertical-align: middle;
padding-left: 100px;
}
.entry-content .uli > li{
list-style-type: none;
}
<ul class="uli">
<li>
<span>1</span>
<div class="ulcontent">
<h3>Primer contacto</h3>
<p>Contactas conmigo y me cuentas tu idea. Si quieres puedes hacerlo Aquí</p>
</div>
</li>
<li>
<span>2</span>
<div class="ulcontent">
<h3>Consultoría web</h3>
<p>Organizamos una entrevista para conocernos y aclarar las bases del proyecto.</p>
</div>
</li>
<li>
<span>3</span>
<div class="ulcontent">
<h3>Diseño web</h3>
<p>Empieza la creación de un diseño para tu proyectos basado en las necesidades del mismo</p>
</div>
</li>
<li>
<span>4</span>
<div class="ulcontent">
<h3>Desarrollo</h3>
<p>Una vez se apruebe el diseño definitivo comenzamos la fase de desarrollo, en la cual se programa el tema totalmente desde cero y se le añaden todas las funcionalidades a la web</p>
</div>
</li>
<li>
<span>5</span>
<div class="ulcontent">
<h3>Implementación</h3>
<p>En este momento se añade el contenido, se personaliza y se traslada a tu servidor para que puedas administrarlo tu mismo</p>
</div>
</li>
<li>
<span>6</span>
<div class="ulcontent">
<h3>Consultoría previa</h3>
<p>Nos reuniremos por videoconferencia para conocernos y sentar las bases de lo que será tu nuevo sitio de membresía. ¿Estás listo? ¡Vamos allá!</p>
</div>
</li>
</ul>
You can add the below styles to the <span> tag which is inside the <li> tag.
display: block;
float: left;
line-height: 100px;
Check the edited codepen
Edited version
The text inside my divs goes over to the next image, from my image horizontal scroll. I want each text inside each image but I am trying everything and nothing works!
The overlapping text is caused by the white-space: nowrap; on the .list-inline selector. So lets add white-space: normal; to the .DocumentList p selector to fix this.
Here is the full updated CSS:
.factorSection{
display:none;
}
#section2-05{
padding-right:0;
padding-left: 10px;
padding-bottom:0;
}
#section2-05 h2{
color: #424242;
font-weight:900;
font-size: 1.7em;
line-height: 1.2em;
margin-bottom: 0;
}
#section2-05 .col-lg-12 p{
font-size: 1.2em;
line-height: 1.4em;
margin-bottom:1em;
}
.section2-05_phone{
display:block;
overflow-x: scroll;
width: auto;
white-space: nowrap;
}
.documentList{
overflow-x:scroll;
overflow-y:hidden;
height:200px;
width:100%;
padding: 0 15px;
}
.factorImgText{
position:absolute;
z-index: 1;
padding: 0 5px;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
margin: 0;
text-align: center;
width:90%;
}
.factorImg1, .factorImg2, .factorImg3, .factorImg4{
position: relative;
display: inline-block;
margin: 8px 8px;
box-shadow: 2px 2px 4px #bbb;
border-top-right-radius: 4px;
width: 320px;
height: 100%;
vertical-align: bottom;
background-position: top left;
background-repeat: no-repeat;
background-size: cover;
height:370px;
}
.factorImg1{
background-image: url('https://images.unsplash.com/photo-1504151046121-7fed23ebed42?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=57b654bb2ec29b612049176a9abd8cd6');
margin-right:3px;
}
.factorImg2{
background-image: url('https://images.unsplash.com/photo-1504151046121-7fed23ebed42?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=57b654bb2ec29b612049176a9abd8cd6');
margin-right:3px;
}
.factorImg3{
background-image: url("https://images.unsplash.com/photo-1504151046121-7fed23ebed42?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=57b654bb2ec29b612049176a9abd8cd6");
margin-right:3px;
}
.factorImg4{
background-image: url("https://images.unsplash.com/photo-1504151046121-7fed23ebed42?ixlib=rb-0.3.5&q=85&fm=jpg&crop=entropy&cs=srgb&s=57b654bb2ec29b612049176a9abd8cd6");
margin-right:3px;
}
.list-inline {
white-space:nowrap;
}
.DocumentList h6, .DocumentList p{
color:#fff;
font-weight:900;
}
.DocumentList h6{
font-size: 1em;
text-align: center;
width: 100%; /* Changed from 90% --> 100% to help center. */
margin: 0; /* Added to help center. */
}
.DocumentList p{
font-size: .75em;
line-height: 1.4em;
margin-bottom: 0;
white-space: normal; /* Add to fix the overlapping text. */
}
<div class="row row-fluid section2-05_phone">
<div class="DocumentList col-lg-12">
<ul class="list-inline">
<li class="factorImg1">
<div class="factorImgText">
<h6>2 DÍAS ANTES… ¡ZURPRAIS!</h6>
<p>Con tu pack de experiencias, tu edad y tu perfil (familias, parejas, amig#s…), organizaremos tu plan… Y como es Zurprais, 2 días antes sabrás lo que es.</p>
</div>
<div class="overlay1"></div>
</li>
<li class="factorImg2">
<div class="factorImgText">
<h6>PLANES CON UN PLUS</h6>
<p>Un atardecer en velero… ¿con cava y ostras? Un brunch… ¿entre viñedos? Todas tus experiencias tendrán un toque extra que las hará aún más especiales.</p>
</div>
<div class="overlay2"></div>
</li>
<li class="factorImg3">
<div class="factorImgText">
<h6>EMOCIÓN DESDE LA RESERVA</h6>
<p>Al reservar, empieza el juego. Recibirás algunas pistas sobre las actividades que te podrían tocar. Para que vayas calentando motores.</p>
</div>
<div class="overlay3"></div>
</li>
<li class="factorImg4">
<div class="factorImgText">
<h6>CAMBIO GRATUITO</h6>
<p>¡Segurísimo que tu plan te va a encantar! Pero para que estés tranquil#: si no te gusta lo que te hemos organizado, te preparamos uno diferente para otro día.</p>
</div>
<div class="overlay4"></div>
</li>
</ul>
</div>
</div>