-2

The question is very simple: how to PROPERLY avoid table for layout. Problems: DIV layout with float:left is not always useful because often at browser stretch all divs pile one over the other...

I have a container div

<div id="container"> 
<div id="child1"> </div>
<div id="child2"> </div>
<div id="child3"> <div>
</div>

Container 100% page. child 1, 2 width fixed width ( exampe 300px) and the 3rd width variable width 30%

I whant them not to pile one over the other on browser stretch. Is it posible ? Thank you

velteyn
  • 313
  • 3
  • 7
  • 22

2 Answers2

1

http://thoughtsandideas.wordpress.com/2010/07/15/introduction-to-div-based-layout/

don't use tables for layouts. maybe the link can help you.

roman
  • 889
  • 9
  • 16
1

You should ALWAYS avoid using <table> for layout. <table> is made to display tabular data. That is it's purpose. If you use it outside of that purpose, then you are using it wrong. Additionally, if you can't achieve the layout you want using float's or display: inline, then you are most likely doing it wrong, or need a little bit of javascript to help you out until the flexbox functionality is fully implemented and supported.

See this post here for further explanation: Why not use tables for layout in HTML?

Community
  • 1
  • 1
Michael
  • 7,016
  • 2
  • 28
  • 41