# יצירת 2 טבלאות באותו שורה

**URL:** <https://meta.discourse.org/t/creating-2-tables-in-the-same-line/179431>\
**Category:** Support\
**Created:** [12 בפברואר,‏ 2021,‏ 9:16am UTC](https://meta.discourse.org/t/creating-2-tables-in-the-same-line/179431 "2021-02-12T09:16:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_G](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thomas_g/32/200158_2.png) [@Thomas\_G](https://meta.discourse.org/u/Thomas_G)\
**Post date:** [12 בפברואר,‏ 2021,‏ 9:16am UTC](https://meta.discourse.org/t/creating-2-tables-in-the-same-line/179431/1 "2021-02-12T09:16:15Z")

</div>

Hey everyone,

does anyone know whether it’s possible to create 2 tables in the same line? Like having one on the left and one on the right side?

| | |
| --- | --- |
| Left | Side |

* * *

 ![image](https://global.discourse-cdn.com/meta/original/3X/3/9/39e3bd85969372726948dbd6b66adc6dd8ec244a.png)

---

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [13 בפברואר,‏ 2021,‏ 1:31am UTC](https://meta.discourse.org/t/creating-2-tables-in-the-same-line/179431/2 "2021-02-13T01:31:01Z")

</div>

> [@Thomas\_G](#):
>
> does anyone know whether it’s possible to create 2 tables in the same line?

It’s not possible by default, but can be achieved by creating two tables that are wrapped in a div that has a `data` attribute. That `data` attribute can then be targeted in your site’s theme to create a two column table. Here’s a basic example. I’m far from a CSS expert, so adjust the CSS to suite your needs.

Raw post content:

```plaintext
<div data-two-column-table>

|foo|bar|
|---- | ----|
|this|that|

</div>

<div data-two-column-table>

|foo|bar|
|---- | ----|
|this|that|

</div>

```

Theme CSS (note that it’s targeting the `.md-table` div that Discourse wraps tables in:

```css
div[data-two-column-table] .md-table {
    width: 50%;
    display: inline-block;
    float: left;
}

```

Expected output:

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/3/e3ad820d23539ee60f0e9411f04c7729929f6a96.png)

One possible downside of styling tables in this way is that the styles will not be preserved in emails sent from the site.

---

<div class="post-metadata">

**Author:** ![Thomas\_G](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thomas_g/32/200158_2.png) [@Thomas\_G](https://meta.discourse.org/u/Thomas_G)\
**Post date:** [13 בפברואר,‏ 2021,‏ 1:34pm UTC](https://meta.discourse.org/t/creating-2-tables-in-the-same-line/179431/3 "2021-02-13T13:34:29Z")

</div>

I see. Thanks for letting me know!

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [15 במרץ,‏ 2021,‏ 1:35pm UTC](https://meta.discourse.org/t/creating-2-tables-in-the-same-line/179431/4 "2021-03-15T13:35:13Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
