Greetings.
I am trying to figure out how to use CSS to position an element in the
bottom right of its containing element. I thought this would be
accomplished using "position: relative; bottom: 0; right: 0;" but clearly
I'm mistaken. Can anyone help me?
Here's a minimal example:
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<title>foobar </title>
<style type="text/css">
.frame { border: solid thick black; }
.para { border: dotted thin orange; }
.aside {
position: relative;
bottom: 0;
right: 0;
border: dotted thin red;
}
</style>
</head>
<body>
<div class="frame">
<div class="aside">
This should appear in the bottom right corner of the "frame".
</div>
<p class="para">
Here is a paragraph which should display at the top of the
"frame".
</p>
Here is an anonymous box in the "frame".
</div>
</body>
</html>
I would like the output to be something like this:
+-------------------------------------------------------------------+
|Here is a paragraph which should display at the top of the "frame".|
| |
|Here is an anonymous box in the "frame". |
| |
| This should appear in the bottom right corner of the "frame".|
+-------------------------------------------------------------------+
Regards,
Tristan
--
_
_V.-o Tristan Miller [en,(fr,de,ia)] >< Space is limited
/ |`-' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= <> In a haiku, so it's hard
(7_\\ http://www.nothingisreal.com/ >< To finish what you
I am trying to figure out how to use CSS to position an element in the
bottom right of its containing element. I thought this would be
accomplished using "position: relative; bottom: 0; right: 0;" but clearly
I'm mistaken. Can anyone help me?
Here's a minimal example:
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<title>foobar </title>
<style type="text/css">
.frame { border: solid thick black; }
.para { border: dotted thin orange; }
.aside {
position: relative;
bottom: 0;
right: 0;
border: dotted thin red;
}
</style>
</head>
<body>
<div class="frame">
<div class="aside">
This should appear in the bottom right corner of the "frame".
</div>
<p class="para">
Here is a paragraph which should display at the top of the
"frame".
</p>
Here is an anonymous box in the "frame".
</div>
</body>
</html>
I would like the output to be something like this:
+-------------------------------------------------------------------+
|Here is a paragraph which should display at the top of the "frame".|
| |
|Here is an anonymous box in the "frame". |
| |
| This should appear in the bottom right corner of the "frame".|
+-------------------------------------------------------------------+
Regards,
Tristan
--
_
_V.-o Tristan Miller [en,(fr,de,ia)] >< Space is limited
/ |`-' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= <> In a haiku, so it's hard
(7_\\ http://www.nothingisreal.com/ >< To finish what you
Comment