Nov 22, 2009

Div Child Height Same Height As The Father - how to set child height to be the same..

free web hosting
Open Discussion > MODERATED AREA > Computers > Programming Languages > HTML, XML etc..

Div Child Height Same Height As The Father - how to set child height to be the same..

mizako
I will try to explain myself as briefly as possible. I want have the next
xhtml squeletone:
CODE

<html>
 <head>
 </head>
 <body>
 <div id="container">
   <div id="header">
     <div id="searchEngine">
       <!-- Search Engine Markup >
     </div>
   </div>
   <div id="header2">
   </div>
   <div id="primarynav">
       <!-- primary nav Markup >
   </div>
   <div id="content">
       <!-- content Markup >
   </div>
 </div>
 </body>
</html>

This is the css code applied to the previous markup:
CODE

#container {
 position: absolute;
 left: 50%;
 width: 770px;
 top: 20px;
 margin-left: -385px;
 background: #cccccc;
}
#primarynav {
 position: relative;
 width: 160px;
 background: #333333;
 margin: 0px;
 padding: 0px;
 float: right;
}
#header2 {
 position: relative;
 background: #999999;
 height: 150px;
 width: 40px;
 float: right;
}
#header {
 position: relative;
 background: #999999;
 height: 150px;
 width: 570px;
 float: left;
 background: url(../images/background.jpg) top left no-repeat;
}
#content {
 position: relative;
 float: left;
 overflow: auto;
 background: #cccccc;
 width: 570px;
 margin: 0px;
 padding: 0px;
}


Right now i am obtaining the next output:
user posted image
But i want to obtain an output in which the primary nav goes until the bottom of the container as shown in the figure:
user posted image
Any idea how can i manage to do that with CSS?
Help is really, really appreciated.

 

 

 


Comment/Reply (w/o sign-up)

arboc7
I think I might know you may need to do in your CSS file.


I think you need to do something like this:
CODE

#primarynav {
 height:100%;
}


Please note that this may not be supported by all browsers. You may need to use various workarounds or "filters" which can be found here: http://centricle.com/ref/css/filters/

Hope this helps!!

Comment/Reply (w/o sign-up)

mizako
QUOTE(arboc7 @ Sep 5 2005, 10:23 PM)
I think I might know you may need to do in your CSS file.
I think you need to do something like this:
CODE

#primarynav {
 height:100%;
}


Please note that this may not be supported by all browsers. You may need to use various workarounds or "filters" which can be found here: http://centricle.com/ref/css/filters/

Hope this helps!!
*



Thanks! it seems that the next code fixes the problem. However i remember me trying this before without success. Thanks again.
CODE
#container {
...
height: 100%;
...
}

#primarynav {
...
height: 100%;
...
}


 

 

 


Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)


Searching Video's for div, child, height, height, father, set, child, height
See Also,
advertisement


Div Child Height Same Height As The Father - how to set child height to be the same..

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com