Web Analytics Made Easy -
StatCounter Div height help. - CodingForum

Announcement

Collapse
No announcement yet.

Div height help.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Div height help.

    Hey,

    I have 3 div sections.

    Scenario: One a bottom thats is the underlay of of the main content on the left side and then the right side div that is floated to the right and is not inside the bottom div.

    Problem: I want the bottom one to have the same height as the context how do i do this.

    Tried: Giving them the height: inherit; but doesnt do anything it just keeps the height the same as the right section.

    Help: Any would be good. Thanks
    .pLeAd InSaNiTy.

  • #2
    Can you post the html and css.

    Comment


    • #3
      Code:
      /* CSS Document */
      
      * {
      margin:0;
      padding:0;
      outline:none;
      }
      
      body 	{	background-color: black;	
      			font-size: x-small;
      			font-family: sans-serif;	
      		}
      
      
      #navigation {	background-color: #181825;
      					width:114em;
      					text-align: center;
      					border-top: 0.2em solid #2E2E49;
      					padding:1em 0em;
      					margin:3.5em auto 1px;
      					font-family: Georgia; serif;
      					color:white;
      					letter-spacing:0.2em;
      					text-transform:uppercase;
      }
      
      #nav li {	list-style: none;
      				display: inline;
      				margin-right: 0px;
      }
      
      #nav a 	{	padding: 1.2em;
      				color: #ACACB0;
      				text-decoration: none;
      			}
      
      #nav a:hover	{	color: white;
      						text-decoration: underline;
      					}
      
      #nav a.active 	{	color: white;
      						font-weight: bold;
      						text-decoration: none;	
      					}
      					
      #content		{		background-color: #181820;
      						padding-left: 0.4em; 
      						margin:0.1em auto 0.5em;
      						height: inherit;											
      						width: 74em;						
      						color: white;
      						float: left;
      						font-size: small;
      						
      
      				}
      					
      #right		{		background-color: #181830;
      						width: 15em;
      						height: inherit;					
      						color: white; 
      						float: right;
      						padding-left: 0.5em;	
      				}
      				
      #right h3	{		text-align: center;
      						font-family: Georgia; serif;
      				}
      				
      #bottom		{		background-color: #181830;
      						padding: 0.5em;
         margin:0.5em auto 0.1em auto											
      						width: 113em;
      						height: 100%;						
      						color: white;
      				}
      Code:
      <html>
      
      <head>
      	<link href="../css/style.css" rel="stylesheet" type="text/css" />
      </head>
      
      <body>
      
      
      <div id="navigation">
      	<ul id="nav">
      		<li><a href="../index.html">Home</a></li>
      		<li><a href="about.html" class="active">About Us</a></li>
      		<li><a href="#" >Volunteers</a></li>
      		<li><a href="#">Information</a></li>
      		<li><a href="#">Results</a></li>
      		<li><a href="#">Site-Map</a></li>
      		<li><a href="#">Help</a></li>
      		<li><a href="#">Refrences</a></li>
      	</ul>
      </div>
      
      <div id="bottom">
      
      <div id="content">
      <h2>ABOUT US</h2><h5><a class="active">| Team Members</a></h5>
      </br>
      Team FROG (<b>F</b>rog <b>R</b>esearch <b>O</b>n the <b>G</b>rain)</br>
      Currently has 4 team members
      </br>
      </br>
      --------------------------------------------------------------------------------------------------------------</br>
      <b>Cooper Kelly</b></br>
      <b>Frog Specialist - Team Leader</b></br>
      </br>
      Cooper has been with the team since its inauguration in 1999. He is a Gold Coast local and enjoys the challenges that he gets from the 
      frog world. "Not only do i get to do something i love i get to do it with my 3 best mates" Cooper Says. Cooper is one of the leading 
      frog resarchers in the country. </br>
      </br>
      During his free time he likes to get out and go camping with wife and 2 young children Billy and Cameron.</br>
      </br>
      --------------------------------------------------------------------------------------------------------------</br>
      <b>Joey Bruss</b></br>
      <b>Air and Water Specialist</b></br>
      </br>
      Joey has been with the team for a while now joining back in 2000. Joey spends alot of time with the injured frogs and making sure that there
      rehab areas are at optimal for recovery. Joey was the second member to join the team after meeting Cooper Kelly at an animal convention 
      in ealry 2000. </br>
      </br>
      Joey is a crazy sports nut and in his free time likes to attend the local footy games.</br>
      </br>
      --------------------------------------------------------------------------------------------------------------</br>
      <b>Darren Hall</b></br>
      <b>Veterinary Specialist</b></br>
      </br>
      Darren has been with the team since 2005. Darren's role is to conduct search’s with the volunteers in search of new species of frog in the 
      wild is Vererinary skills come in to play when they find all sorts of animals on the adventures.</br>
      </br>
      Amber enjoys riding her motorcycle and teaching the less fortunate to play the piano in her spare time.</br>
      </br>
      --------------------------------------------------------------------------------------------------------------</br>
      <b>Amber Jasmine</b></br>
      <b>Environment Specialist</b></br>
      </br>
      Amber has only been with the team a short joining in December 2010. Amber has traveled the world to see all animals in there own environment
      and her knowledge in the area is invaluable to the teams success in uncovering new species of frog.</br>
      </br>
      Amber enjoys riding her motorcycle and teaching the less fortunate to play the piano in her spare time.</br></br> 
      
      </div>
      
      <div id="right">
      &copy Copyright
      </div>
      
      </body>
      </html>
      Thanks
      .pLeAd InSaNiTy.

      Comment


      • #4
        inherit means, taking height of its parent element if defined.. if parent element does not have any height defined.. then inherit will not work....

        also there are many typo in your code as following...

        closing <div> is missing

        font-family: Georgia; serif; extra semi-colon in your #navigation { ....}

        Comment

        Working...
        X