Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8926771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:03:36+00:00 2026-06-15T08:03:36+00:00

I am trying to do something, but I can’t. I have a table where

  • 0

I am trying to do something, but I can’t.
I have a table where the results are like this:

+----------+
|Dressing 1|
+----------+
|Dressing 2|
+----------+
|Dressing 3|
+----------+
|Dressing 4|
+----------+
|Dressing 5|
+----------+
|Dressing 6|
+----------+
|Dressing 7|
+----------+
|Dressing 8|
+----------+
|Dressing 9|
+----------+

But I want it to display it like this:

+----------+----------+----------+
|Dressing 1|Dressing 2|Dressing 3|
+----------+----------+----------+
|Dressing 4|Dressing 5|Dressing 6|
+----------+----------+----------+
|Dressing 7|Dressing 8|Dressing 9|
+----------+----------+----------+

Right now, I have a code like this:

<table cellpadding="6" border=0>

<tr style="height:20px">

{foreach from=$group.attributes name=awp_loop item=group_attribute}

{strip}

{assign var='id_attribute' value=$group_attribute.0}

<td align="center" {if $group.group_layout}valign="top"{/if}>
<div id="awp_checkbox_cell{$id_attribute}" style="{if !$group.group_layout}float:left;{else}width:100%;clear:left;{/if}">

{if $group.group_per_row > 1}<center>{/if}

<input style="border:none;margin:0;padding:0" type="checkbox" {if $group.attributes_quantity.$id_attribute == 0 && $awp_out_of_stock == 'disable'}disabled="disabled"{/if} class="awp_attribute_selected awp_group_class_{$group.id_group}" name="awp_group_{$group.id_group}" id="awp_checkbox_group_{$id_attribute}" onclick="awp_select('{$group.id_group|intval}',{$group_attribute.0|intval}, {$awp_currency.id_currency},false);" value="{$group_attribute.0|intval}" {if $group.default|is_array && $id_attribute|in_array:$group.default}checked{/if} />&nbsp;

{if $group.group_per_row > 1}</center>{/if}

</div>
</td>

{if $smarty.foreach.awp_loop.iteration < $group.attributes|@count && $smarty.foreach.awp_loop.iteration % $group.group_per_row == 0}

</tr>

<tr style="height:20px;">

{/if}

{/strip}

{/foreach}

</tr>

</table>

But I can’t figure out how to make the table or the code to only make 3 entries in a row.
If someone could help, it would be great.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:03:39+00:00Added an answer on June 15, 2026 at 8:03 am

    I would use a list and float each li element left. That would give you your desired result and it would be a lot cleaner.

    http://jsfiddle.net/Zppya/

    As for your table method… add a counter and use the mod/remainder function to determine every third element so you can create a new row.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying something like this, but this example does not work. jsObj = {};
I'm trying something very basic, but I just can't figure out why this won't
I'm trying to do something but can't remember/find the answer. I have a list
I'm trying to do something that is conceptually similar to this, but can't seem
Trying to do something really simple, but can't figure out the syntax. I have
I'm trying to do something simple in JSF but I can't get it working
I'm trying to do something thats fairly simple but I can't see the best
I'm trying to do a simple update, but can't figure out somthing. I have
im trying to achieve something but i dont really know how I have set
I feel like I'm trying to do something simple but I am not getting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.