Question: I have the following html code:

```css
    .container {
        display: table;
        width: 100%;
        height: 100%;
      }

      .menu-container {
        width: 150px;
        height: 100%;
        background: #1b1b1b;
        color: #fff;
        display:table-cell;
      }

      .menu-container h1 {
        margin: 0px;
        width: 100%;
        padding: 5px 0px 5px 15px;
        background: #171717;
        font-weight: 600;
      }

      .main-container {
        width: auto;
        display:table-cell;
        box-shadow: -10px 0px 40px -10px #000000;
      }

    .container-header {
          width: 100%;
          background: red;
       }
```

```html
<div class="container">
  <div class="menu-container">
    <h1>Browse</h1>
    <menu-container></menu-container>
  </div>
  <div class="main-container">
    <div>
      <div class="container-header">some text</div>
      random text
    </div>
  </div>
</div>
```

Here how it looks: 

![screenshot1](https://i.stack.imgur.com/go66C.png)

As you can see there is a space before the "some text" element. I don't want that extra space I want the element to start at the top of its container. I tried few tricks such as margin-top: -Xpx but it didn't work. How can I fix this?

Answer: 
Is this you want? 

Just use `display:flex` on `container`.

```css
.container {
  display: table;
  width: 100%;
  height: 100%;
  display:flex;
}

.menu-container {
  width: 150px;
  height: 100%;
  background: #1b1b1b;
  color: #fff;
  display: table-cell;
}

.menu-container h1 {
  margin: 0px;
  width: 100%;
  padding: 5px 0px 5px 15px;
  background: #171717;
  font-weight: 600;
}

.main-container {
  width: 100%;
  display: table-cell;
  box-shadow: -10px 0px 40px -10px #000000;
}

.container-header {
  width: 100%;
  background: red;
}
```

```html
<div class="container">
  <div class="menu-container">
    <h1>Browse</h1>
    <menu-container></menu-container>
  </div>
  <div class="main-container">
    <div>
      <div class="container-header">some text</div>
      random text
    </div>
  </div>
</div>
```
Please check this.

```css
.container {
    display: table;
    width: 100%;
    height: 100%;
  }

  .menu-container {
    width: 20%;
    height: 100%;
    background: #171717;
    color: #fff;
    display: table-cell;
    float: left;
  }

  .menu-container h1 {
    margin: 0px;
    width: 100%;
    padding: 5px 0px 5px 15px;
    font-weight: 600;
  }

  .main-container {
    width: auto;
    display: table-cell;
    box-shadow: -10px 0px 40px -10px #000000;
    float: left;
    width: 80%;
  }

.container-header {
      width: 100%;
      background: red;
   }
```

```html
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){

});
</script>
</head>
<body>

<div class="container">
          <div class="menu-container">
            <h1>Browse</h1>
            <menu-container></menu-container>
          </div>
          <div class="main-container">
<div><div class="container-header">some text</div>
  random text
</div>
          </div>
        </div>

</body>
</html>
```

Hope it will helpful for you.

Thanks.