I'm not sure I understand the problem. Are you talking about creating an HTML table?
If so, you can ensure even columns by explicitly setting a column width. And if you omit a row height, the row will automatically expand to enclose the cell content.
blocblue
Practically a Posting Shark
837 posts since Jan 2008
Reputation Points: 272
Solved Threads: 161
Skill Endorsements: 12
That does help to clarify your problem.
The obvious thing to point out is if you want the content blocks in each column to flow immediately one after the other, then a table will likely only complicate your problem given the fixed nature of the relationship between rows and cells.
Have you considered using divs to build your layout? For example and using Lorem Ipsum for the variable length content:
<div class="data-container">
<div class="column column-1">
<div class="cell">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh felis, bibendum ut aliquet sed, dapibus eget ligula.</p>
</div>
<div class="cell">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh felis, bibendum ut aliquet sed, dapibus eget ligula.</p>
</div>
</div>
<div class="column column-2">
<div class="cell">
<p> Mauris eu consectetur magna. Donec id nulla in massa ornare egestas ut non nibh. Fusce varius pellentesque adipiscing. Etiam erat leo, adipiscing a gravida at, molestie vitae ligula. Maecenas a euismod dolor. Vestibulum molestie placerat diam, et tincidunt ante egestas ac. Vivamus quis enim at massa suscipit interdum. Donec ac neque urna, rutrum ullamcorper lorem. Duis semper vulputate libero, eget elementum diam accumsan sed.</p>
</div>
<div class="cell">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh felis, bibendum ut aliquet sed, dapibus eget ligula.</p>
</div>
</div>
<div class="column column-3">
<div class="cell">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh felis, bibendum ut aliquet sed, dapibus eget ligula.</p>
</div>
<div class="cell">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh felis, bibendum ut aliquet sed, dapibus eget ligula.</p>
</div>
</div>
</div>
<style type="text/css">
.data-container {border:1px solid #333; display:block; float:left; width:902px;}
.data-container .column {display:block; float:left; width:300px;}
.data-container .column-2 {border-left:1px solid #333; border-right:1px solid #333;}
.data-container .column .cell {border-bottom:1px solid #333; display:block; float:left; padding:5px 10px; width:280px;}
.data-container .column .cell:last-child {border:none;}
</style>
blocblue
Practically a Posting Shark
837 posts since Jan 2008
Reputation Points: 272
Solved Threads: 161
Skill Endorsements: 12
Question Answered as of 9 Months Ago by
blocblue
and
rotten69 I wouldn't think it'd be possible to achieve that layout using tables, without a lot of hassle - i.e. more hassle than it would be worth.
One option, #######ising the use of tables would be to insert multiple div containers within a single table cell. Thus, you only use a table to create a three columns, single row layout.
<table>
<tr>
<td>
<div class="cell"></div>
<div class="cell"></div>
</td>
<td>
<div class="cell"></div>
<div class="cell"></div>
</td>
<td>
<div class="cell"></div>
<div class="cell"></div>
</td>
</tr>
</table>
blocblue
Practically a Posting Shark
837 posts since Jan 2008
Reputation Points: 272
Solved Threads: 161
Skill Endorsements: 12
I'm not sure this is php, but it can help with a 'template'.
Have your skeleton HTML template with divs. Above the doctype declaration or with your include files, get all the various data for the sections into variables, then have something like:
<div id="wrapper">
<div id="left">
<div id="left_top"><?php echo $left_top;?></div>
<div id="left_bottom"><?php echo $left_bottom;?></div>
</div>
<div id="main">
<div id="main_top"><?php echo $main_top;?></div>
<div id="main_bottom"><?php echo $main_bottom;?></div>
</div>
<div id="right">
<div id="right_top"><?php echo $right_top;?></div>
<div id="right_bottom"><?php echo $right_bottom;?></div>
</div>
<div id="footer"><?php echo $footer;?></div>
</div>
I know you say there's no prob with getting data out of the DB. If column heights are your problem, you could look at the new CSS3 multicolumns (one example of a tut here: http://www.quirksmode.org/css/multicolumn.html). Alternatively, look at js solutions for culumn heights (one example here: http://www.impressivewebs.com/equal-height-columns-with-javascript-full-version/).
//EDIT
darn - I just noticed - my view of this thread was a couple of hours old - missed the intervening posts - apologies one and all. (shakes own head)
diafol
Keep Smiling
10,666 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,514
Skill Endorsements: 57