I would like to enter a value into the input, but nothing happens. However, after 2 clicks the image is selected automatically.
I don't understand why I can't enter values in the input? I think it's an HTML/CSS problem?
Here is a screenshot
Thank you very much for your help and your time.
ol.wrapper_digipass {
margin: 0 0 0 15px;
padding: 0;
}
.title_digipass {
font-weight: 700;
padding-bottom: 5px;
}
.information_digipass {
padding-top: 5px;
}
.instruction_digipass {
list-style: circle;
padding-bottom: 10px;
font-size: 14px;
display: flex;
flex-direction: column;
gap: 10px;
}
.logoDigipass {
position: relative;
height: 110px;
width: 130px;
}
.logoDigipass img {
position: absolute;
top: -31px;
left: -12px;
}
.logoDigipass1 {
position: relative;
padding: 0;
}
.logoDigipass1 img {
height: 125px;
margin-left: -25px;
}
.wrapper_digipass {
position: relative;
}
.section_instruction {
margin-top: -60px;
padding-bottom: 35px;
}
.width30 {
width: 30%;
}
.width42 {
width: 42%;
}
.width434 {
width: 434px
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<div class="section_digipass">
<ol class="wrapper_digipass">
<li class="title_digipass">Utilisez votre digipass.</li>
<p class="information_digipass">Après avoir réactivé votre digipass et introduit votre code PIN, celui-ci demande quelle application vous souhaitez utiliser.</p>
<ul class="instruction_digipass">
<li>Appuyez sur le chiffre "2"</li>
<li>Introduisez d'abord les 6 <u>chiffres</u> soulignés extraits du code SVM du titre <u>000347075</u> , qui sont <strong>007075</strong></li>
<li>Introduisez le nombre de titres de l'opération, donc 10, suivant le format : <strong>000010</strong></li>
<li>Le digipass vous fournit un code de 6 chiffres à introduire dans la zone de confirmation</li>
</ul>
<li class="title_digipass">Introduisez le code de 6 chiffres affichés par le digipass.</li>
<div class="wrapper_digipass">
<div class="logoDigipass1">
<img src="https://via.placeholder.com/150">
</div>
<div class="section_instruction">
<div class="row">
<div class="col-6 col-form-label text-end width42">
<label for="code">Code de confirmation</label>
</div>
<div class="col-4 width434">
<input type="text " id="code" name="code" class="form-control d-inline width30 "> et cliquez ensuite sur <strong>"Confirmer ".</strong>
</div>
</div>
</div>
</div>
</ol>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
As others suggested in the comments above, logoDigipass1 is overlapping section_instruction.
To solve this problem add this to your CSS:
.section_instruction {
position: relative; /* Add this */
z-index: 1; /* Add this */
}
See the snippet below.
ol.wrapper_digipass {
margin: 0 0 0 15px;
padding: 0;
}
.title_digipass {
font-weight: 700;
padding-bottom: 5px;
}
.information_digipass {
padding-top: 5px;
}
.instruction_digipass {
list-style: circle;
padding-bottom: 10px;
font-size: 14px;
display: flex;
flex-direction: column;
gap: 10px;
}
.logoDigipass {
position: relative;
height: 110px;
width: 130px;
}
.logoDigipass img {
position: absolute;
top: -31px;
left: -12px;
}
.logoDigipass1 {
position: relative;
padding: 0;
}
.logoDigipass1 img {
height: 125px;
margin-left: -25px;
}
.wrapper_digipass {
position: relative;
}
.section_instruction {
margin-top: -60px;
padding-bottom: 35px;
position: relative; /* Add this */
z-index: 1; /* Add this */
}
.width30 {
width: 30%;
}
.width42 {
width: 42%;
}
.width434 {
width: 434px
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<div class="section_digipass">
<ol class="wrapper_digipass">
<li class="title_digipass">Utilisez votre digipass.</li>
<p class="information_digipass">Après avoir réactivé votre digipass et introduit votre code PIN, celui-ci demande quelle application vous souhaitez utiliser.</p>
<ul class="instruction_digipass">
<li>Appuyez sur le chiffre "2"</li>
<li>Introduisez d'abord les 6 <u>chiffres</u> soulignés extraits du code SVM du titre <u>000347075</u> , qui sont <strong>007075</strong></li>
<li>Introduisez le nombre de titres de l'opération, donc 10, suivant le format : <strong>000010</strong></li>
<li>Le digipass vous fournit un code de 6 chiffres à introduire dans la zone de confirmation</li>
</ul>
<li class="title_digipass">Introduisez le code de 6 chiffres affichés par le digipass.</li>
<div class="wrapper_digipass">
<div class="logoDigipass1">
<img src="https://via.placeholder.com/150">
</div>
<div class="section_instruction">
<div class="row">
<div class="col-6 col-form-label text-end width42">
<label for="code">Code de confirmation</label>
</div>
<div class="col-4 width434">
<input type="text " id="code" name="code" class="form-control d-inline width30 "> et cliquez ensuite sur <strong>"Confirmer ".</strong>
</div>
</div>
</div>
</div>
</ol>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
Related
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>
here's the result I'd like to obtain once I'm reducing the window :
the problem in this result is that they aren't centered, once I center them that's what I get, I guess I'm doing something wrong : the issue. This code is the one that cause the issue when they're centered.
Here's my code :
section {
margin-top: 25px;
padding: 24px;
box-sizing: border-box;
}
h2 {
margin-bottom: 30px;
text-align: center;
font-weight: bold;
font-size: 22px;
}
.flex-container {
display: flex;
flex-direction: column;
align-content: flex-start;
height: 100%;
padding: 15x;
}
.flex-container > div{
position: relative;
left: 21%;
border-radius: 5px;
padding: 8px;
}
.articleactu img {
float: left;
border-radius: 15px;
max-width: 210px;
}
p {
word-wrap: break-word;
max-width: 900px;
padding-left: 200px;
}
#titre {
line-height: px;
font-weight: bold;
}
#date {
font-size: 14px;
font-weight: bold;
color: #662189;
}
hr.solid {
position: relative;
left: 21%;
width: 50%;
opacity: 12%;
}
div p ,#titre ,#date {
margin-left: 35px;
}
<!-- ACTUALITÉ - ARTICLES -->
<section>
<h2> L'ACTUALITÉ </h2>
<article class="articleactu">
<div class="flex-container">
<div>
<img src="images/gtaarticle.jpeg" alt="Article GTA " class="center">
<p id="titre">GTA : THE TRILOGY DEFINITIVE EDITION, les fans sont déçus !</p>
<p> Les joueurs attendaient une refonte complète de la trilogie afin de rappeler de lointains souvenirs mais malheureusement les fans sont déçus...</p>
<p id="date"> Publié le 27 novembre 2021 </p>
</div>
<hr class="solid">
<div>
<img src="images/bf2042-2.jpg" alt="Article GTA " class="center">
<p id="titre">BATTLEFIELD 2042 : De très mauvaise notes pour le nouvel opus.</p>
<p> Le lancement du jeu est malheureusement un raté... Un jeu rempli de bugs, on repense évidemment à Cyberpunk 2077...</p>
<p id="date"> Publié le 26 novembre 2021 </p>
</div>
<hr class="solid">
</article>
</section>
I hope that anyone can help me with this. Thanks in advance !
The main reason is
.flex-container > div{
left: 21%;
}
Then, that div has full width(100%) but the left position has 21%. So the content will look on the left side.
Try like this.
section {
margin-top: 25px;
padding: 24px;
box-sizing: border-box;
}
h2 {
margin-bottom: 30px;
text-align: center;
font-weight: bold;
font-size: 22px;
}
.flex-container {
display: flex;
flex-direction: column;
align-content: flex-start;
height: 100%;
padding: 10%;
}
.flex-container > div {
display: flex;
}
.flex-container > div > div {
float: left;
}
.description {
margin-left: 20px;
}
.articleactu img {
border-radius: 15px;
max-width: 210px;
}
p {
word-wrap: break-word;
}
#titre {
line-height: px;
font-weight: bold;
}
#date {
font-size: 14px;
font-weight: bold;
color: #662189;
}
hr.solid {
position: relative;
width: 50%;
opacity: 12%;
}
your HTML
<section>
<h2> L'ACTUALITÉ </h2>
<article class="articleactu">
<div class="flex-container">
<div style="display: flex">
<div>
<img src="images/gtaarticle.jpeg" alt="Article GTA " class="center">
</div>
<div class="description">
<p id="titre">GTA : THE TRILOGY DEFINITIVE EDITION, les fans sont déçus !</p>
<p> Les joueurs attendaient une refonte complète de la trilogie afin de rappeler de lointains souvenirs mais malheureusement les fans sont déçus...</p>
<p id="date"> Publié le 27 novembre 2021 </p>
</div>
</div>
<hr class="solid">
<div>
<div>
<img src="images/bf2042-2.jpg" alt="Article GTA " class="center">
</div>
<div class="description">
<p id="titre">BATTLEFIELD 2042 : De très mauvaise notes pour le nouvel opus.</p>
<p> Le lancement du jeu est malheureusement un raté... Un jeu rempli de bugs, on repense évidemment à Cyberpunk 2077...</p>
<p id="date"> Publié le 26 novembre 2021 </p>
</div>
</div>
<hr class="solid">
</div>
</article>
</section>
I would like to align two divs but it's not working.
<!DOCTYPE html>
<html lang="fr">
<head>
<title>ELOUANN'S SITE</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="../css/index.css"/>
<link rel="icon" type="image/png" href="../img/webdev.png"/>
</head>
<body>
<div id="headDiv">
<div id="headDivTitle">
<img src="../img/webdev.png" width="10%"/><a class="trait">|</a><a>ELOUANN'S SITE</a>
</div>
<div id="headDivFile">
<a id="indexFile" href="./index.html">Accueil</a>
<a class="next">></a>
<a class="anyfile">...</a>
</div>
</div>
<div id="contentDiv">
<div id="rightDiv" class="content">
<div id="rightDivDescription">
<div id="border">
<a>Bienvenue ! Ici tu vas pouvoir apprendre quelques éléments de base du HTML et du CSS, ainsi que l'accès à un memento qui te permettra d'avoir une liste de chaque éléments de chaque langage accompagné d'une description, afin de pouvoir les utiliser à des fins personnelles !</a>
</div>
</div>
</div>
<div id="buttonsDiv" class="content">
<div id="buttonsDivHtml">
<img src="../img/languages/030-html-5.png" width="10%"/>Apprendre le HTML
</div>
<div id="buttonsDivCss">
<img src="../img/languages/031-css.png" width="10%"/>Apprendre le CSS
</div>
</div>
</div>
</body>
</html>
This is my html file. I would like align "buttonsDiv" and "rightDiv".
This is my css file :
/* STYLE DU TITRE ET DE L'IMAGE */
body{
background-color: #efecca;
font-family: Bahnschrift Light;
}
body div#headDiv{
background-color: #002f2f;
padding-top: 2%;
padding-left: 5%;
padding-bottom: 2%;
box-shadow: 0px 0px 100px black;
}
body div#headDiv div#headDivTitle a{
vertical-align: middle;
font-size: 250%;
color: #e6e2af;
}
body div#headDiv div#headDivTitle img{
vertical-align: middle;
}
body div#headDiv div#headDivTitle a.trait{
font-size: 420%;
margin-left: 1.5%;
margin-right: 3%;
color: #6f6c52;
}
/* STYLE DU TEXTE DES FICHIERS */
body div#headDiv div#headDivFile {
margin-left: 7%;
margin-top: 3%;
}
body div#headDiv div#headDivFile a{
font-size: 150%;
color: #e6e2af;
}
body div#headDiv div#headDivFile a.next{
font-size: 170%;
margin: 5%;
color: #6f6c52;
}
/* STYLE DE LA BOITE DE DROITE ET DE LA DESCRIPTION */
body div#contentDiv div#rightDiv{
background-color: #002f2f;
margin-top: 2%;
margin-bottom: 2%;
box-shadow: 0px 0px 10px black;
margin-right: 80%;
font-size: 175%;
}
body div#contentDiv div#rightDiv div#rightDivDescription{
padding: 10%;
color: #e6e2af;
}
body div#contentDiv div#rightDiv div#rightDivDescription div#border{
box-shadow: -10px 0px 0px #046380;
}
/* STYLE DES BOUTONS */
body div#contentDiv div#buttonsDiv div img{
vertical-align: middle;
}
body div#contentDiv div#buttonsDiv div a{
vertical-align: middle;
}
and when i use this, it gives me that :
https://cdn.discordapp.com/attachments/760957022686019625/760957040775397406/unknown.png
Please help me soon. Thanks you all. Bye
I would suggest you to make a few changes:
don't use margin-right in #rightDiv. Instead you can use width: 20%; if you want that much width is acquired by the div. Also use float: left;. May be you will get your intended result.
How to put the line <hr> about 15 px above the bottom of the text block somewhere between button and bottom textblock?
.box {
background: white;
float: right;
position: relative
}
.space {
padding: 15px;
}
img {
max-width: 100%;
}
.button {
position: absolute;
bottom: 40px;
margin-left: 15px;
}
#media (max-width:768px) {
.button {
position: relative;
bottom: auto;
margin-left: 15px;
}
}
<div class="box">
<img class="box" src="https://d2f0ora2gkri0g.cloudfront.net/e4/16/e4164876-1967-4303-9a57-aae00eb2b22b.png" alt="oproeien" style="margin-right:0px; margin-left:0px">
<h2 class="space">Amsterdam</h2>
<p class="space">Amsterdam is de (titulaire) hoofdstad en naar inwonertal de grooteeuw tot stadsuitbreidingen, waaronder de laatste grachten van de fortificatie die nu als grachtengordel bekend is en in 2010 is toegevoegd aan de UNESCO-Werelderfgoedlijst.</p>
<a class="button" href="https://www.buienradar.nl">Slecht weer</a>
<hr>
</div>
Why not simply border on text that you can easily control with padding:
.box {
background: white;
float: right;
position: relative
}
.space {
padding: 15px;
}
p.space {
border-bottom:1px solid #000;
}
img {
max-width: 100%;
}
.button {
position: absolute;
bottom: 40px;
margin-left: 15px;
}
#media (max-width:768px) {
.button {
position: relative;
bottom: auto;
margin-left: 15px;
}
}
<div class="box">
<img class="box" src="https://d2f0ora2gkri0g.cloudfront.net/e4/16/e4164876-1967-4303-9a57-aae00eb2b22b.png" alt="oproeien" style="margin-right:0px; margin-left:0px">
<h2 class="space">Amsterdam</h2>
<p class="space">Amsterdam is de (titulaire) hoofdstad en naar inwonertal de grooteeuw tot stadsuitbreidingen, waaronder de laatste grachten van de fortificatie die nu als grachtengordel bekend is en in 2010 is toegevoegd aan de UNESCO-Werelderfgoedlijst.</p>
<a class="button" href="https://www.buienradar.nl">Slecht weer</a>
</div>
And if you want to control the width of the line you can consider a linear-gradient trick (or pseudo-element):
.box {
background: white;
float: right;
position: relative
}
.space {
padding: 15px;
}
p.space {
background:linear-gradient(to bottom,transparent calc(100% - 1px),#000 0) 0 0/50% 100% no-repeat;
}
img {
max-width: 100%;
}
.button {
position: absolute;
bottom: 40px;
margin-left: 15px;
}
#media (max-width:768px) {
.button {
position: relative;
bottom: auto;
margin-left: 15px;
}
}
<div class="box">
<img class="box" src="https://d2f0ora2gkri0g.cloudfront.net/e4/16/e4164876-1967-4303-9a57-aae00eb2b22b.png" alt="oproeien" style="margin-right:0px; margin-left:0px">
<h2 class="space">Amsterdam</h2>
<p class="space">Amsterdam is de (titulaire) hoofdstad en naar inwonertal de grooteeuw tot stadsuitbreidingen, waaronder de laatste grachten van de fortificatie die nu als grachtengordel bekend is en in 2010 is toegevoegd aan de UNESCO-Werelderfgoedlijst.</p>
<a class="button" href="https://www.buienradar.nl">Slecht weer</a>
</div>
I want the bar to remain such as this, but the three menu options (along with the drop-down ) pass be at the center of the page.
The page have some img's (including de menu bar) that is not included.
header, footer, aside, nav, article {
display: block;
}
header h1{
color: #670C15;
text-align: center;
}
body {
margin: 0 auto;
width: 940px;
font: 13px/22px Helvetica, Arial, sans-serif;
background: #f5f5f1;
}
h1 {
font-size: 28px;
line-height: 30px;
padding: 10px 0;
}
h2 {
font-size: 23px;
line-height: 25px;
padding: 10px 0;
}
h3 {
font-size: 18px;
line-height: 20px;
padding: 11px 0;
}
p {
padding-bottom: 22px;
}
nav {
display: block;
position: absolute;
left: 0;
width: 100%;
background: url("nav_background.png");
}
nav ul {
padding: 0;
margin: 0;
}
nav ul:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
/********************************/
nav li {
position: relative;
float: left;
list-style-type: none;
margin: 0 auto;
}
nav li a {
display: block;
padding: 10px 20px;
border-left: 1px solid #999;
border-right: 1px solid #222;
color: #777;
text-decoration: none;
}
nav li a:focus {
outline: none;
text-decoration: underline;
}
nav li:first-child a {
border-left: none;
}
nav li:hover ul {
display:block;
}
nav a span {
display: block;
float: right;
margin-left: 5px;
}
nav ul ul {
display: none;
width: 100%;
position: absolute;
left: 0;
background: #670C15;
}
/******************************/
nav ul ul li {
float: none;
}
nav ul ul a {
padding: 5px 10px;
border-left: none;
border-right: none;
font-size: 14px;
}
nav ul ul a:hover {
color: #fff;
}
nav ul li a:hover {
color: #fff;
}
nav ul a span {
-moz-transform:rotate(-180deg);
-webkit-transform:rotate(-180deg);
transform: rotate(-180deg);
}
#intro {
position: relative;
margin-top: 66px;
padding: 44px;
background: #467612 url("intro_background.png") repeat-x;
border-radius: 170px 50px;
}
#intro img {
position: absolute;
top: 0;
right: 0;
width: 470px;
height: 100%;
border-radius: 170px 50px;
}
#intro h2 {
position: relative;
z-index: 9999;
width: 600px;
padding: 0 0 0 0;
font-weight: bold;
}
#intro p {
position: absolute;
top: 0;
right: 0;
padding: 3% 0 0 0;
width: 400px;
z-index: 9999;
font-weight: bold;
}
#contenido {
display: table;
}
#contenidoPrincipal {
display: table-cell;
width: 620px;
padding-right: 22px;
}
aside {
display: table-cell;
width: 300px;
}
.blogPost div {
column-count: 2;
column-gap: 22px;
-moz-column-count: 2;
-moz-column-gap: 22px;
-webkit-column-count: 2;
-webkit-column-gap: 22px;
}
.blogPost img {
margin: 22px 0;
box-shadow: 3px 3px 7px #777;
width: 100%;
}
#comentarios {
margin-top: 21px;
padding-top: 22px;
border-top: 1px solid #d7d7d7;
}
#comentarios article {
display: table;
padding: 22px;
}
section#comentarios article:nth-child(2n+1) {
padding: 21px;
background: #E3E3E3;
border: 1px solid #d7d7d7;
border-radius: 11px;
}
#comentarios article header {
display: table-cell;
width: 220px;
padding-right: 22px;
}
#comentarios article header a {
display: block;
font-weight: bold;
color: #000;
}
#comentarios article header a:hover {
text-decoration: none;
}
#comentarios article p {
padding: 0;
}
form {
margin-top: 21px;
padding-top: 22px;
border-top: 1px solid #d7d7d7;
}
form p {
display: table;
margin-bottom: 22px;
padding: 0 22px;
}
form label {
display: table-cell;
width: 140px;
padding-right: 20px;
text-align: right;
font-weight: bold;
vertical-align: top;
}
form input[type="text"], form input[type="email"], form input[type="url"] {
display: table-cell;
width: 300px;
height: 20px;
border: 1px solid #d7d7d7;
}
form textarea {
width: 300px;
height: 100px;
border: 1px solid #d7d7d7;
}
form input[type="submit"] {
margin-left: 162px;
}
aside section {
margin: 22px 0 0 22px;
padding: 11px 22px;
background: url("sidebar_section_background.png") repeat-x;
}
aside section ul {
margin: 0 0 0 22px;
list-style: none;
}
aside section ul li a {
display: block;
text-decoration: none;
color: #000;
}
aside section ul li a: hover {
text-decoration: underline;
}
footer {
position: absolute;
left: 0;
width: 100%;
background: #681E1E;
}
footer div {
display: table;
margin: 0 auto;
padding: 44px 0;
width: 940px;
color: #777;
}
footer div section {
display: table-cell;
width: 300px;
}
footer div #acerca, footer div #otrosBlogs {
padding-right: 20px;
}
footer h3 {
color: #FFF;
}
footer a {
color: #999;
}
footer a:hover {
color: #FFF;
text-decoration: none;
}
footer ul {
margin: 0 0 0 40px;
list-style: square;
color: #565656;
}
footer ul li a {
display: block;
}
form p label{
color: #914F56;
}
<!doctype html>
<html>
<head id="titulo">
<title>Título de Página</title>
<link rel="stylesheet" href="estiloexpe.css" type="text/css" media="screen" />
</head>
<body>
<header>
<h1>Título de Página</h1>
</header>
<nav>
<ul>
<li>Inicio</li>
<li>
Archivo<span>^</span>
<ul>
<li> Submenú 1 </li>
<li> Submenú 2 </li>
<li> Submenú 3 </li>
</ul>
</li>
<li>Contacto</li>
</ul>
</nav>
<br><br><br><br>
<section id="intro">
<h2>Esta es una introducción de prueba.</h2>
<img src="intro_pebbles.png" alt="Image: Felixco, Inc. / FreeDigitalPhotos.net" />
<p>Cuando todo va mal te imagino sonriendo y se me pasa. <br> Ese es mi truco y esa es tu magia.</p>
</section>
<div id="contenido">
<div id="contenidoPrincipal">
<section>
<article class="blogPost">
<header>
<h2>Título del post.</h2>
<p> Escrito el <time datetime= "2016-02-08T09:20:45-06:00">23 de febrero de 2016
</time> por Genessis - Sin comentarios
</p>
</header>
<div>
<p>Para comprender el valor de un año, habla con el alumno que reprobó.
Para comprender el valor de un mes, habla con la madre de un bebé prematuro.
Para comprender el valor de una semana, habla con el redector de un semanario.
Para comprender el valor de un día, habla con el obrero que debe alimentar seis hijos.
</p>
<img src="DianaDardos.jpg" alt="Image: renjith krishnan / FreeDigitalPhotos.net" />
<p>Para comprender el valor de una hora, habla con los amantes que ansían verse.
Para comprender el valor de un minuto, habla con la persona que no alcanzo el tren.
Para comprender el valor de un segundo, habla con quien sobrevivió a un accidente.
Para comprender el valor de una milesima de segundo, habla con quien gano medalla de plata en las olimpiadas.
</p>
</div>
</article>
</section>
<section id="comentarios">
<header>
<h3>Comentarios</H3>
</header>
<article>
<header>
Juan Peacute el <time datetime= "2016-02-09T03:35:20-06:00">
23 de febrero del 2016 a las 12:50 am </time>
</header>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut.
</p>
</article>
<article>
<header>
Mafer Castillo el <time datetime="2012-02-09T11:40:09-06:00">
23 de febrero de 2016 a las 3:00 pm</time>
</header>
<p>Digamos que hoy me levante otoñal, pero hable contigo y ya tengo los bolsillos
llenos de veranos.
<p>Cuando quieras/puedas, ven a buscarlos.</b>
</p>
</article>
</section>
<form action="#" method="post">
<h3>Agregar comentario</h3>
<p>
<label for="Nombre">Nombre</label>
<input name="nombre" id="nombre" type="text" required />
</p>
<p>
<label for="email">Correo</label>
<input name="email" id="email" type="email" required />
</p>
<p>
<label for="website">Sitio Web</label>
<input name="website" id="website" type="url" />
</p>
<p>
<label for="comentario">Comentario</label>
<textarea name="comentario" id="comentario" required></textarea>
</p>
<p>
<input type="submit" value="Agregar Comentario" />
</p>
</form>
</div>
<aside>
<section>
<header>
<h3>Categorias</h3>
</header>
<ul>
<li> Lorem ipsum dolor. </li>
<li> Sit amet consectetur. </li>
<li> Adipisicing elit sed. </li>
<li> Do eiusmod tempor. </li>
<li> Incididunt ut labore. </li>
</ul>
</section>
<section>
<header>
<h3>Archivos</h3>
</header>
<ul>
<li> Enero 2012 </li>
<li> Diciembre 2011 </li>
<li> Noviembre 2011 </li>
<li> Octubre 2011 </li>
</ul>
</section>
</aside>
</div>
<footer>
<div>
<section id="Acerca">
<header>
<h3>Acerca de...</h3>
</header>
<p>
¿Que gano yo, si obtengo lo que ansío?
Un sueño, un aliento, una chispa de goce fugaz.
¿Quien cambiaria un momento de jubilo por una semana de llanto vacio?
¿O quien venderia la eternidad para tener un juguete y solaz?
¿O por una dulce uva, destruiria la vid y su haz?
</p>
</section>
<section id="otrosBlogs">
<header>
<h3>Otros Blogs</h3>
</header>
<ul>
<li> HTML5Tutoriales </li>
<li> HTML5tuto </li>
<li> HTML </li>
</ul>
</section>
<section id="popular">
<header>
<h3>Lo más popular</h3>
</header>
<ul>
<li> Ten confianza en ti mismo, y en todos los que te rodean </li>
<li> Fija metas que puedas alcanzar. </li>
<li> Habla con tus actos y no con tus palabras. </li>
</ul>
</section>
</div>
</footer>
</body>
</html>
Just a few minor CSS changes:
nav {
// remove position:absolute;
// remove left:0;
display: block;
width:auto;
background: url("nav_background.png");
}
nav ul{
padding:0;
margin: 0 auto;
width:24em; // ( or however many li elements you have at 8em width)
}
nav li {
width:8em; // (for example. Could be larger or smaller or px or %)
}