2011-05-23 4 views
2

Je le conteneur qui ont une hauteur de 100% et son grand travailhauteur div intérieure css

Je veux que le contenu du client sera de 80%
Je veux que ce soit comme ça

Example http://img545.imageshack.us/img545/2822/exmapler.png

Voici ma page HTML et CSS

CSS

* 
{ 
    padding: 0; 
    margin: 0; 
} 
html, body 
{ 
    height: 100%; 
} 

#container 
{ 
    min-height: 99%; 
    border-color: #36A9E9; 
    border-width: thin; 
    border-style: solid; 
    width: 85%; 
    margin: 0 auto; 
    background-color: ThreeDFace; 
} 
* html #container 
{ 
    height: 100%; 
} 
#ClientContent 
{ 
    min-height: 80%; 
    border-color: #36A9E9; 
    border-width: thin; 
    border-style: solid; 
    width: 100%; 
    margin: 0 auto; 
    background-color: ThreeDFace; 
} 

HTML

<body> 

<form id="container" runat="server"> 

<div id="ClientContent"> 

</div> 
</form> 
</body> 

s'il vous plaît suggérer une idée?

+1

plus clair s'il vous plaît – breezy

+0

image ajoutée pour être plus clair – avnic

Répondre

3

Cela semble fonctionner here

* 
{ 
    padding: 0; 
    margin: 0; 
} 
html, body 
{ 
    height: 100%; 
} 
#container 
{ 
    position: relative; 
    min-height: 99%; 
    border-color: #36A9E9; 
    border-width: thin; 
    border-style: solid; 
    width: 85%; 
    margin: 0 auto; 
    background-color: ThreeDFace; 
} 
* html #container 
{ 
    height: 100%; 
} 
#ClientContent 
{ 
    position: absolute; 
    height: 80%; 
    border-color: #36A9E9; 
    border-width: thin; 
    border-style: solid; 
    width: 99.6%; 
    margin: 0 auto; 
    background-color: ThreeDFace; 
} 
+0

merci beaucoup !!!! – avnic

0

Ajouter #Clientcontent {height:80%}

+0

fonctionne pas, vous pouvez voir dans le code ci-dessus – avnic

+0

quel navigateur vous rencontrez ce problème avec? – breezy

+0

essayé sur chrome et Ie 7 – avnic

0

Il vous suffit de mettre l'alignement vertical vers le haut et il devrait être ok. Mettez-le sur le #ClientContent. Je ne suis pas sûr si c'est ce qui manque vraiment. Essayez d'ajouter max-height: 80% aussi. Comme ceci:

#ClientContent 
{ 
max-height:80%; 
vertical-align:top; 
min-height: 80%; 
border-color: #36A9E9; 
border-width: thin; 
border-style: solid; 
width: 100%; 
margin: 0 auto; 
background-color: ThreeDFace; 
} 
+0

Salut essayé ceci ... ne fonctionne toujours pas .. :( – avnic

+0

Votre élément clientContent Qu'est-ce que c'est? Est-ce un div? Un span? Un p? – Joze