Arranging hidden elements using CSS
OK, this is what I need :
- I've got a horizontal container (let's call that C), containing 2 elements (A,B)
- Of these two elements, only one has to be visible at any time. So, the other's
visibilityproperty is set to
- Let's say these elements are placed with this exact sequence :
||, and thus right-aligned.
- When element B is active, everything is OK.
- When element A is active (and thus B is invisible), the A element doesn't float to the right side and remains where it is :
The question :
- How can I "push" element A to the right ("above" element B), so that it is like it's floating right/
display:none; instead of
visibility:hidden; will hide the element but still occupy the space
This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here