Fetching data in a multi-column view layout

February 09, 2015 10:25pm

Subscribe [1]
  • #1 / Feb 09, 2015 10:25pm


    1 posts

    Hello everyone,

    I am a new member here and new to codeigniter as well. For the time I am still exploring the power that this wonderfull framework provides.

    My question has to do with the proper way for someone to present the data being fetched (from a search query lets say) to the view in a multi-column layout style.

    I ve read some old, archived topics in this forum solving the problem with code inside the controller ( ) but I ve also found that now, with css 3, we can do something like this : (dummy content follows)

    Lets say my html outpout in my view is like this one below :

    <div id="someid">
           <div>  1st data row, blog post, Lorem ipsum etcetrus <div>
           <div>  2nd data row blog post, Lorem ipsum etcetrus<div>
           <div>  3rd data row blog post, Lorem ipsum etcetrus<div>
           <div>  nth data row blog post, Lorem ipsum etcetrus<div>

    by adding the following css style I finally get the effect :

    <style  type="text/css">
          div#someid {   -moz-column-count: 2;  -moz-column-gap: 45px;  padding: 10px; margin: 1opx 10px;}

    BUT because I want to learn things the right way, I would like to know if - for any reason- it is supposed to be a bad tactic (besides the fact that it’s css dependent solution) and so I should follow the solving approach included in the forums’ article that I mentioned above.

    Thank in advance :roll:

  • #2 / Feb 13, 2015 11:56am


    1 posts

    Anyone? :roll: Thanks

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases