Webflow sync, pageviews & more.
NEW

How can I add horizontal and vertical borders to the cells in my 6-column by 3-row table in Webflow using Grid?

TL;DR
  • Create a 6-column by 3-row Grid in Webflow and add a Div Block (with a shared "Table Cell" class) to each grid cell.
  • Apply 1px solid borders to all sides of the "Table Cell" class; use Combo Classes on edge cells to eliminate overlapping borders by selectively applying right and bottom borders.

To add horizontal and vertical borders to each cell in a 6-column by 3-row table using Webflow's Grid layout, follow these steps:

1. Set Up Your Grid

  • Add a Section or Container to your page.
  • Drag in a Grid element from the Add panel.
  • In the Grid settings, set it to 6 columns and 3 rows.

2. Add Div Blocks as Cells

  • Inside each Grid cell, add a Div Block that will act as your "cell."
  • Use consistent class naming (e.g., name it "Table Cell").
  • Add this Div Block into all 18 grid cells manually or use Copy/Paste.

3. Style the Table Cell

  • Select the “Table Cell” class and apply the following styles:
  • Border: Set a 1px solid border on all sides (choose any color, often #000 or #ccc for table borders).
  • Padding: Add internal spacing if needed (e.g., 10px).
  • Width & Height: Let the Grid control sizing unless a fixed cell size is needed.

4. (Optional) Manage Overlapping Borders

  • If the 1px borders on adjacent cells create double-thick lines:
  • Keep the border only on the top and left of each cell.
  • Add an extra bottom border to the last row and a right border to the last column only.
  • This technique reduces overlap but requires conditional styling:
    • Add a Combo Class to the rightmost cells (e.g., "Table Cell rightedge") and apply border-right: 1px.
    • Add a Combo Class like "bottomedge" to bottom row cells and apply border-bottom: 1px.

Summary

To create a table with visible horizontal and vertical borders using Webflow’s Grid, place a Div Block with a border in each Grid cell and optionally fine-tune border application using Combo Classes to eliminate double borders.

Rate this answer

Other Webflow Questions