How to fix when angular 2 component take full width of the page?
<p>My angular 2 components are taking full width of the page.
When I limit the component width, its margin is stretched to full width.
So I cannot bring other components beside this. How can I limit the width of components?
I tried display: inline, but no use.Still the component takes full width allowing nothing to come beside this.</p>

<pre><code>import { Component } from '@angular/core';
import { Item }    from './../item';
import { ItemComponent }    from './ItemComponent';

@Component({
  selector: 'Item-Set',
  directives: [ItemComponent],
  template: '&lt;div class="singleItem" *ngFor="let eachItem of itemList"&gt;&lt;Item&gt;&lt;/Item&gt;&lt;/div&gt;'
})

export class ItemSet{
  itemList: Item[];
  constructor(){
    this.itemList=ItemList;
  }
}
</code></pre>

<p>In style sheet</p>

<pre><code>.singleItem{
  width:300px;
}
</code></pre>