Jump to content

dj kim

Members
  • Posts

    6
  • Joined

  • Last visited

dj kim's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. HelloI tried to sort out this problem fo hours now and I don't get it! It shouldn't realy be a big problem but anyway... I have a div-tag with a defined height and inside some text. I want to have this text in the vertical middle of the div tag. vertical-align:middle is not good because its only working in relations with other inline elements and not relative to its parent block-element.Anybody a suggestions?Would realy apreciate your help
  2. hi thundercadeWell if i want to change the containers height because of design changes. In this case it would not be to hard but with more complex design with cascaded boxes etc. Let's say container is a box which hasn't got a fix pixel-height but takes 20% of the body height...The point is I had some designs where I put it in the end with all fix heights, like you suggest. Then if there was something to change, like adding some pixels to the top-boxes height...I had to change all heights of the childs, childs chils, and so on...
  3. Hi boenYes pulpfiction is right. Imagine a sub1 as header which has to be always the same height (for a logo or so) sub2 should take up the rest, even if the height of container changes...
  4. Hi pulpfiction, thx for your helpBut I tried it. Even with your code. If you switch between your 100% and 80px you see the difference. with 100% sub2 has a height of 100px
  5. No, this renders you sub2 to the same height as his parent (container).Other suggestions?
  6. HiI had following problem several times:I have a block e.g. a div whit a defined height and inside 2 divs, one also with a defined height. How can I have the other div taking all the height left?My code: <div id="container" style="height:100px; width:100px;"> <div id="sub1" style="height:20px; background-color:green; margin:0px;"></div> <div id="sub2" style="???????????; background-color:red; margin:0px;"></div></div> What has the style for sub2 to be in order to get the upper 20px in green and the lower in red? Without putting the height to 80px of course... in order to be flexible when changing height of container.Would apreciate your help a lot
×
×
  • Create New...