I want to align two sidebars and one centered image in height.
Additionally the sidebars (which contain text) should be vertical aligned in the height from the outer container.
I made a fiddle which describes the problem:
http://jsfiddle.net/SW3DT/
When having this example on a fullscreen you see everything correct but when you look into the fiddle html preview (or any smaller view) it doesn’t work anymore.
So there are following problems:
- Align aside and center-containers horizontal (position: absolute, left, right)
- Align the child object from the asides (in this case the p’s) vertically (breaks the absolute)
- Do this all dynamically so that it can be used on different screen sizes
How you can see all three points together make it hard to code this with css.
Does anyone have a solution?
Furthermore:
How could I define reusable css-classes for such tasks?
Best Regards,
bsus
If I did understand you question correctly, you kinda want a centered wrapper with three columns, having the left and right column occupying 200px of width. If this is the case:
See this Fiddle Example
HTML:
CSS:
Furthermore: How could I define reusable css-classes for such tasks?
You can see the
.columnclass that is applied to the.left,.rightand.centerelements, thus being reused on all three.