Auto height!

Location of the Videos
Post Reply
skacke
Posts: 38
Joined: Mon Oct 12, 2009 10:08 pm

Auto height!

Post by skacke »

Hey guys!

I have another div problem -.-'

When i try to auto height my container div, it only works in ie. How do i fix this?

CSS

Code: Select all

div.container { background-color: black;
color: red;

     border: 1px solid gray;
     width:1000px;
     top:100px;
     margin-left:auto;
     margin-right:auto;
     z-index:1;
     top:0px;
     height:100%;
     height:auto !important; 
     height:100%;

     min-height:100%; 

}

Code: Select all

echo "<div class='container' style='position:relative;'>";
User avatar
Torniquet
Posts: 869
Joined: Sun Aug 02, 2009 6:18 am

Re: Auto height!

Post by Torniquet »

well for a start, your calling a top placement twice, you have 3 heights in there. and a min height of 100%. my best guess is your confusing the poor thing lol.

Code: Select all

div.container { 
    background-color: black;
    color: red;
     border: 1px solid gray;
     width:1000px;
     top:100px;
     margin-left:auto;
     margin-right:auto;
     z-index:1;
     min-height:200px;
     position:absolute;
}

try something more like that. (im no css expert btw :p)
New Site Coming Soon! Stay tuned :D
skacke
Posts: 38
Joined: Mon Oct 12, 2009 10:08 pm

Re: Auto height!

Post by skacke »

Guess i'm to tired to think correctly


EDIT:
Tried it and it still does not work :(
User avatar
Torniquet
Posts: 869
Joined: Sun Aug 02, 2009 6:18 am

Re: Auto height!

Post by Torniquet »

ok i have tried it, and it works in IE,FF,saffari and chrome.

although i had to change the position back to relative :p

other than that, the box expands to fit and contracts to the minimum height set.
New Site Coming Soon! Stay tuned :D
Post Reply

Return to “Older Browser MMO Videos”