Question: Here is my code: <http://jsfiddle.net/8z4aw/>

I want to have a bunch of div's that are behaving like a table. As you can see, I have specified explicitly their widths, but the browser is completely ignoring it and doing what it wants. Also, it appears that those div's are having a right margin, that is not specified anywhere. So where does it come from? How to fix those two problems?

**Ignore code below, pasting it only so that post will go through**

```
.standardTable {
    color: #fff;
}

```

Answer: 
You have a couple options:

<http://css-tricks.com/fighting-the-space-between-inline-block-elements/>

My preferred is to set the font-size of the parent element to 0 and set the font-size on the children manually:

<http://jsfiddle.net/8z4aw/9/>

This is what I changed in the CSS:

```
.standardTable {
    font-size: 0;
}

.standardTable .td, 
.standardTable .th,
.standardTable .tr {
    font-size: 18px;
}

```
Well the widths aren't behaving because you have two different sets of padding on them, due to the "th" and "td" classes.

So, anything with the classes "th integer" is going to have a width of 181px and a padding of 10px. This adds up to a total width of 201px

However, anything with the classes "td integer" has a width of 181px and a padding of 20px, which means they have a total width of 221px

So, due to your padding, those are always going to be 20px different from one another.

The reason you have a "right margin" is because the table with class "standardTable" is actually inheriting it's width from the js fiddle window, which means it is 100%. You need it to be set to a fixed with that adds up to all the cells inside.

You can see the problem here:

```
            <div class="th integer">
                Podkategorii
            </div>

            <div class="td integer">
                0
            </div>

```

---

```
            .standardTable .th {
                display: inline-block;
                background-color: #2b5797;
                padding: 10px;
            }

            .standardTable .td {
                display: inline-block;
                background-color: #2d89ef;
                padding: 20px;
            }

```

**Here's a working fiddle:**

<http://jsfiddle.net/shayl/8z4aw/13/>