|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Trying to put two boxes inside a thrid box with CSS. But outside will not autosize.
Here is the code of what I am attempting:
PHP Code:
The two inside boxes form correctly, but the outside box does not correctly adjust to contain the inside boxes. I know I have read something about what I am missing here, so am hoping someone can give me a pointer. Thanks for any help. ![]() |
|
#2
|
||||
|
||||
|
|
|
#3
|
||||
|
||||
|
Yes it may, thanks for the reference.
|
|
#4
|
|||
|
|||
|
seems fine to me. the outside box is 100%, with the inners adding up to 100% too. what are you trying to do?
|
|
#5
|
||||
|
||||
|
Well the problem with the CSS examples given, is that they will not fill up their respective side of the outside box.
So for example, if I want to have two boxes next to each other, as you might have two table cells. And I want the left box to be some form entry description, and the right box to be the form text entry cell - If the text is long the box on the left will expand correctly(3 lines), but the background of the box on the right(1 line), will only extend to the vertical height of the 1 line. Now if you used two table cells and not css, you could have each cells color defined, and not worry about the left cell being 3 times as high as the cell on the right, and thus affected the right cells background color. Hope that makes sense. |
|
#6
|
|||
|
|||
|
Oh, ok. then set the height of the inner boxes to 100%
|
|
#7
|
||||
|
||||
|
Yes, tried that and still no luck, the rightside box still wants to only cover 1 line height for some reason.
here is what the CSS looks like: PHP Code:
|
|
#8
|
|||
|
|||
|
oh. you must set the outer box to have a height. then it will work.
|
|
#9
|
||||
|
||||
|
Ahhh, that got it. Thanks
![]() |
|
#10
|
||||
|
||||
|
hah.
Ok one more question. I have a checkbox in the right-side box, is there a way to vertically align it? I tried vertical-align:middle; and vertical-align:text-middle; but had no success. Since it is a form object, not sure how to deal with it. |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > Trying to put two boxes inside a thrid box with CSS. But outside will not autosize. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|