Jump to content

Expanding div vertically to accommodate content


alenphp

Recommended Posts

I have basically 3 divs. Top horizontal for title etc. And two vertical ones. Float left and float right. On the left side I input data in the form and it is shown on the right side. But when there is more posts div doesn't grow to accommodate all posts? 

header{
  	position:fixed;
  	top:0px;
  	height:15%;
  	left:0px;
  	right:0px;
  	background-color:#333;
  	color:#FFF;
  	z-index:10;
 	opacity:0.6;
 }
 #left{
 	position:absolute;
 	top:15%;
 	bottom:0px;
 	width:50%;
 	height:100%;
 	left:0px;
 	background-color:#900;
 	color:#FFF;
 	z-index:8;
 	overflow:hidden;
 	clear:both;
 }
 #right{
 	position:absolute;
 	top:15%;
 	bottom:0px;
 	width:50%;
 	height:100%;
 	right:0px;
 	background-color:#999;
 	color:#FFF;
 	z-index:8;
 	overflow:hidden;
 	clear:both;
 }
Link to comment
Share on other sites

it would help to see the file.  you are setting height in your columns and not sure what the containing element is.  for instance, if the containing element has a fixed height, and your columns are each set at

height:100%;

, i dont believe they will adjust vertically for more content.  and that content will be cutoff with

overflow:hidden;
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.