---
title: "Extjs - How to set border for the Container."  
description: "Extjs - How to set border for the Container."  
author: "Anonymous User"  
published: 2016-05-05  
updated: 2016-05-11  
canonical: https://www.mindstick.com/forum/34127/extjs-how-to-set-border-for-the-container  
category: "sencha extjs"  
tags: ["sencha", "sencha cmd"]  
reading_time: 1 minute  

---

# Extjs - How to set border for the Container.

I have created a [container](https://www.mindstick.com/forum/159610/how-to-connect-a-windows-container-to-a-service-running-on-localhost), [now](https://yourviews.mindstick.com/view/81402/it-s-liberals-vs-progressives-in-us-politics-now) I want to create border for our container.My container [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) is below:

```
MyContainer = Ext.extend(Ext.Container, {
    height: 50,
    width: 300,
    id: 'container1',
    initComponent: function() {
        MyContainer.superclass.initComponent.call(this);
    }
});
```

Please help me.!\

## Replies

### Reply by Tarun Kumar

You can set the border like this:\

```
 MyContainer = Ext.extend(Ext.Container, {    height: 50,    width: 300,    id: 'container1',    border: 1,    style: {       borderColor: 'blue',       borderStyle: 'solid'    },    initComponent: function() {        // do your stuff here    }});
```


---

Original Source: https://www.mindstick.com/forum/34127/extjs-how-to-set-border-for-the-container

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
