CONNEXION
  • RetourJeux
    • Sorties
    • Hit Parade
    • Les + populaires
    • Les + attendus
    • Soluces
    • Tous les Jeux
    • Gaming
  • RetourActu Gaming
    • News
    • Astuces
    • Tests
    • Previews
    • Toute l'actu gaming
  • RetourBons plans
    • Bons plans
    • Bons plans Smartphone
    • Bons plans Hardware
    • Bons plans Image et Son
    • Bons plans Amazon
    • Bons plans Cdiscount
    • Bons plans Decathlon
    • Bons plans Fnac
    • Tous les Bons plans
  • RetourJVTech
    • Actus High-Tech
    • Intelligence Artificielle
    • Smartphones
    • Mobilité urbaine
    • Hardware
    • Image et son
    • Tutoriels
    • Tests produits High-Tech
    • Guides d'achat High-Tech
    • JVTech
  • RetourCulture
    • Actus Culture
    • Culture
  • RetourVidéos
    • A la une
    • Gaming Live
    • Vidéos Tests
    • Vidéos Previews
    • Gameplay
    • Trailers
    • Chroniques
    • Replay Web TV
    • Toutes les vidéos
  • RetourForums
    • Hardware PC
    • PS5
    • Switch 2
    • Xbox Series
    • Switch
    • Pokemon pocket
    • FC 25 Ultimate Team
    • League of Legends
    • Tous les Forums
  • PC
  • PS5
  • Xbox Series
  • Switch 2
  • PS4
  • One
  • Switch
  • iOS
  • Android
  • MMO
  • RPG
  • FPS
En ce moment Genshin Impact Valhalla Breath of the wild Animal Crossing GTA 5 Red dead 2
Liste des sujets

probleme CSS pied page

lvscarf
lvscarf
Niveau 6
08 juin 2012 à 09:49:56

Salut tout le monde, après quelques jours de galère j’envoie un SOS ^^
Mon problème :
Une div (ici la div "blocvisiteur" s'allonge en dessous du "blocpied". Tant que le contenu du "bloc" prend de la place, ça va.
Une petite image pour mieux comprendre :
http://img594.imageshack.us/img594/996/sosi.png

Le code:
html:
<div class="corps">
<div class="bloc1">
<?php
include("include/connexion.xhtml");
?>
</div>
<div class="blocVisiteur">
<?php
include("include/visiteur.html");
?>
</div>
<div class="bloc">

</div>
<div class="blocpied">
<?php
include ("include/piedpage.html");
?>
</div>
</div>

(contenu enlevé)
maintenant le CSS :

.corps{
width : 1020px;
height : auto;
border-width : 0px;
margin-left : auto;
margin-right : auto;
border : 1px;
border-color : black;
border : solid;
-moz-box-shadow: 0px 0px 9px #000000;
-moz-border-radius : 10px;
position : relative;

}

.bloc
{
border-width : 0px;
border-color : black;
border-style : dashed;
width : 600px;
height : auto;
margin-left : 330px;
margin-right : auto;
margin-bottom: 40px;
padding-left: 40px;
padding-right: 40px;
padding-top : 40px;
padding-bottom: 40px;
background-color : white;
text-align: justify;
-moz-box-shadow: 0px 0px 9px #000000;
-moz-border-radius : 10px;
border-radius : 15px;
overflow : hidden;
}

.bloc1
{
border-width : 0px;
border-color : black;
border-style : dashed;
width : 200px;
height : auto;
margin-left : 15px;
margin-right : auto;
margin-bottom: 40px;
padding-left: 40px;
padding-right: 40px;
padding-top : 40px;
padding-bottom: 40px;
background-color : white;
-moz-box-shadow: 0px 0px 9px #000000;
-moz-border-radius : 10px;
position : absolute;
border-radius : 15px;
}

.blocpied{
border-width : 0px;
border-color : black;
border-style : dashed;
width : 600px;
height : 10px;
margin-top: 90px;
margin-left : 330px;
margin-right : auto;
margin-bottom: 10px;
padding-left: 40px;
padding-right: 40px;
padding-top : 40px;
padding-bottom: 40px;
background-color : white;
text-align: center;
-moz-box-shadow: 0px 0px 9px #000000;
-moz-border-radius : 10px;
border-radius : 15px;
clear:both;
}

.spacer {
clear : right ;
}

.blocVisiteur{
border-width : 0px;
border-color : black;
border-style : dashed;
width : 200px;
height : 300px;
margin-top: 270px;
margin-left : 15px;
margin-right : auto;
margin-bottom: 30px;
padding-left: 40px;
padding-right: 40px;
padding-top : 40px;
padding-bottom: 100px;
background-color : white;
-moz-box-shadow: 0px 0px 9px #000000;
-moz-border-radius : 10px;
border-radius : 15px;
overflow : hidden;
position : absolute;
}

Je tiens a préciser que je ne suis pas très doué avec le css, et le design en général mais bon ce n'est pas une raison pour boycotter ce langage... quelqu'un peut m'aider svp?

martin232
martin232
Niveau 8
10 juin 2012 à 15:48:44

salut,
faudrait englober pour la colonne gauche bloc1 et blocvisiteur dans un div "float:left", pour la colonne bloc et blocpied dans un autre div "float:right", plutot que d'utiliser des "position:absolute" et des "margin" pour positionner les éléments à droite...

<html>
</head>

<style type="text/css">
.corps{
width : 1020px;
margin-left : auto;
margin-right : auto;
border : 1px;
border-color : black;
border : solid;
-moz-box-shadow: 0px 0px 9px #000000;
-moz-border-radius : 10px;
overflow:hidden;
}

.bloc
{
width : 600px;
height : auto;
margin-bottom: 40px;
padding-left: 40px;
padding-right: 40px;
padding-top : 40px;
padding-bottom: 40px;
background-color : white;
text-align: justify;
-moz-box-shadow: 0px 0px 9px #000000;
-moz-border-radius : 10px;
border-radius : 15px;
overflow : hidden;
}

.bloc1
{
width : 200px;
margin-left : 15px;
margin-right : auto;
margin-bottom: 40px;
padding-left: 40px;
padding-right: 40px;
padding-top : 40px;
padding-bottom: 40px;
background-color : white;
-moz-box-shadow: 0px 0px 9px #000000;
-moz-border-radius : 10px;
border-radius : 15px;
}

.blocpied{
width : 600px;
height : 10px;
padding-left: 40px;
padding-right: 40px;
padding-top : 40px;
padding-bottom: 40px;
background-color : white;
text-align: center;
-moz-box-shadow: 0px 0px 9px #000000;
-moz-border-radius : 10px;
border-radius : 15px;
clear:both;
}

.spacer {
clear : right ;
}

.blocVisiteur{
width : 200px;
height : 300px;
margin-left : 15px;
margin-right : auto;
margin-bottom: 30px;
padding-left: 40px;
padding-right: 40px;
padding-top : 40px;
padding-bottom: 100px;
background-color : white;
-moz-box-shadow: 0px 0px 9px #000000;
-moz-border-radius : 10px;
border-radius : 15px;
overflow : hidden;

}

  1. conteneurgauche{

float:left;width:340px
}

  1. conteneurdroit{

float:right;width:680px
}
</style>

</head>

<body>
<div class="corps">

<div id="conteneurgauche">

<div class="bloc1">
</div>

<div class="blocVisiteur">
</div>

</div>

<div id="conteneurdroit">
<div class="bloc">

</div>
corps
<div class="blocpied"></div>
</div>

</div>

</body>
</html>

PayGleuh
PayGleuh
Niveau 10
10 juin 2012 à 19:52:20

Go Fofo création de sites web + la prochaine fois poste ton code sur pastebin.

Sous forums
  • Aide à l'achat Mac
  • Macintosh
  • Création de Jeux
  • Programmation
  • Création de sites web
  • Linux
  • Internet
  • Steam Deck
  • Hardware
La vidéo du moment