I am attempting to design a layout in which two elements float alongside each other, starting from the center.
I have been successful in achieving this, but only when the width of the two floating elements is fixed.
Want to take a look? Follow this link: http://jsfiddle.net/q7uey80L/3/
Does anyone have a solution for setting the width of elements .right
and .left
to a percentage instead of a fixed value like 300px while maintaining the same alignment from the middle?
When I change the width value from 300px
to 20%
, the structure gets disrupted as the elements start from the left rather than the center.