Goal: I'm trying to style content to be responsive to the dimensions of it's parent div.
Required Behavior
- Depending on the div container the content would react to it and scale appropriately.
- I need content to always be centered.
- Move a container up when there's enough room to fit 2 containers horizontally (example JsFiddle: card-container2 shows the image and card info side by side but the button is still centered.)
Conditions I must meet:
- I am not allowed to use any media Queries.
- I am not allowed to use any JavaScript
- It must ALL be done in html and CSS.
.product-image-area {
text-align: center;
width: 100%;
max-width: 180px;
display: inline-block;
}
EDIT: Due to the complexity of my question I shall illustrate this monster of a task I've been given:
Image: http://i63.photobucket.com/albums/h123/Damian6969/Stack_EXample_zpsmskwkba0.png
So my html code in the black rectangle (let's call this the "inner" container) will always be the same.
This inner container will always have a width of 100% and height of 100%.
The orange container (the "outer" container) will change in dimensions.
I need my inner container be responsive.
...I don't know if I can simplify this anymore guys. Another example is responsive code in general. But instead of a viewport, you have only an outer div.