Content Column in Perfect center with attached Left and Right Columns
I'm creating a webpage 开发者_开发知识库where I need a content column in the perfect center of a block and two columns one on the left (float: right) and one on the right (float:left) attached to that content column. However I want the content column to be of a fluid size.
At first I tried by centering a list of boxes. However the total width of the boxes determines the position of the middle box and if the right box is bigger than the left the content box is offset to the left.
Then I found a solution using tables and forcing the left and right column to be 50% width and the center column to disallow wrapping. But using tables to force layout is always bad.
Is there a possible solution without the use of tables?
*Edit: I prematuraly decided to go back with the list, since it was close to what I wanted and it was the nicest solution. Seems I found a solution with lists, not the best one though. Make the left and right columns fixed on the same width, margin and padding so the center column has the right offset from the left and right.
This page might help you:
http://www.positioniseverything.net/articles/onetruelayout/
精彩评论