I am trying to position an image at the bottom right of a parent div.
The CSS solution I found from another answer did not work as expected, so I had to use JavaScript to achieve the desired result. Is there a way to do this without using JavaScript?
(Please note that the code provided may not work in online editors like jsfiddle or cssdesk.com)
<style>
.container {
overflow: auto;
background-color: green;
}
img {
height: 200px;
width: 150px;
background-color: white;
border: 50px double steelblue;
box-sizing: border-box;
float: right;
clear: right;
}
.spacer {
/* height: calc(100% - 200px); <--- this one sadly doesn't work */
float: right;
}
</style>
<div style="background-color: blue">header + other stuff</div>
<div class="container" id="container">
<div class="spacer" id="spacer"></div>
<img id="img" />
<p>
Conceptualizing random endpoints in an access matrix
provides reach extensions enterprise wide. Respective
divisions historically insignificant, upscale trendlines
in a management inventory analysis survivability format.
</p><p>
Document-centric projections unfetter traditional
auditing practices rivaling central process management.
Advanced functionality, easy administration, proclaim
the hallmarks of unprecedented opportunity.
</p><p>
Iteration system-wide engenders economies of scale,
cross-media technology, presentation action items and
life cycle replication.
</p><p>
Enterprise engenderment accelerates initiative platforms,
reducing staffing components, integration of technical
accessibility, resulting in bottom line pluralisms,
benefit-wise. Incidental re-sizing staff requirements
through attrition can be accelerated by paradigm shifts
and focusing on core suitability and cross-training.
</p><p>
Marketing teams input produce cross purposing in view of
goal alignments due to knowledge paucity, necessitating
workflow education and orientation. Media sourcing as an
acquisition strategy is counterproductive in a internet
environment in virtual component methodology. Imaging
through ideals rather than real world branding, is a
perilous undertaking with negative results. Branding
strategies generating motion as activity without
reproducible results is a ultimately futile effort if
left in place.
</p><p>
Analysis of funding is inappropriate in this effort as
assets are repurposed in statements who existence owe
their identity to their obscurity. Obfuscation of
responsibility underlines these offerings, whose primary
function is to generate revenue and secondarily to shift
accountability downstream.
</p><p>
Syntactically valid structuring implementation,
enhancement based reporting, technology development,
proprietary incidentals administration are all areas of
content modularization engaging visibility deficits.
Cyberliability management procedures underlining
performance degradation vouchsafing interdepartmental
communication guideline infrastructure for evaluating
content management.
</p>
</div>
<div style="background-color: red">other stuff + footer</div>