![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
I am trying to get two divs to align at the bottom of another div. As they are nested in this div, I expected them to be positioned at the bottom of it, using the code below, but they are instead at the bottom of the body. note - I do want them on top of each other, so the only problem is - where is the bottom, and how can I make it the same as the bottom of the div. |
|
(code below) |
#2
| |||
| |||
|
|
"Martin Eyles" <martin.eyles (AT) NOSPAM (DOT) bytronic.com> wrote: I am trying to get two divs to align at the bottom of another div. As they are nested in this div, I expected them to be positioned at the bottom of it, using the code below, but they are instead at the bottom of the body. note - I do want them on top of each other, so the only problem is - where is the bottom, and how can I make it the same as the bottom of the div. http://www.w3.org/TR/CSS21/visudet.h...-block-details |
|
(code below) Don't post code to the group, upload a minimized test case using some real content and post the url. |
#3
| |||
| |||
|
|
I am trying to get two divs to align at the bottom of another div. As they are nested in this div, I expected them to be positioned at the bottom of it, using the code below, but they are instead at the bottom of the body. note - I do want them on top of each other, so the only problem is - where is the bottom, and how can I make it the same as the bottom of the div. http://www.w3.org/TR/CSS21/visudet.h...-block-details According to this link, the text should be at the bottom of the box with a border |
|
(code below) Don't post code to the group, upload a minimized test case using some real content and post the url. http://www.bytronic.com/tests/test1.html I don't really have real content as such. It is for a web app rather than a website as such, so I don't have masses of text. Anyway, real content would kind of go against having a minimised test case. |
#4
| |||
| |||
|
|
"Martin Eyles" <martin.eyles (AT) NOSPAM (DOT) bytronic.com> wrote: I am trying to get two divs to align at the bottom of another div. As they are nested in this div, I expected them to be positioned at the bottom of it, using the code below, but they are instead at the bottom of the body. note - I do want them on top of each other, so the only problem is - where is the bottom, and how can I make it the same as the bottom of the div. http://www.w3.org/TR/CSS21/visudet.h...-block-details According to this link, the text should be at the bottom of the box with a border No, I'll quote the most relevant bits: "If the element has 'position: absolute', the containing block is established by the nearest ancestor with a 'position' of 'absolute', 'relative' or 'fixed'," [...] "If there is no such ancestor, the containing block is the initial containing block." (code below) Don't post code to the group, upload a minimized test case using some real content and post the url. http://www.bytronic.com/tests/test1.html I don't really have real content as such. It is for a web app rather than a website as such, so I don't have masses of text. Anyway, real content would kind of go against having a minimised test case. Using real content allows us to see what you are actually trying to do, often the perceived solution is wrong. -- Spartanicus |
![]() |
| Thread Tools | |
| Display Modes | |
| |