Ext JS 4.2 - How to create a header like the one at KitchenSink sample?


Tags: css,extjs,extjs4,extjs4.2

Problem :

I need to create a header like the one at KitchenSink(Classic theme) sample:

KitchenSink Sample Header

How can I learn its CSS and usage?



Solution :

It's a custom element that extends the very generic Ext.Container:

Ext.define("KitchenSink.view.Header", {
    extend: Ext.Container,
    xtype: "appHeader",
    id: "app-header",
    height: 52,
    layout: {type: "hbox",align: "middle"},
    initComponent: function() {
        this.items = [{xtype: "component",id: "app-header-title",html: "Ext JS Kitchen Sink",flex: 1}];
        if (!Ext.getCmp("options-toolbar")) {
            this.items.push({xtype: "themeSwitcher"})
        }
        this.callParent()
    }
});

Most of its styling happens in custom CSS though. See CSS for #app-header-title.


    CSS Howto..

    how to make the textarea's width fixed but keep the height flexible CSS

    How to tell Modernizr load (yepnope) to add CSS at bottom of head?

    CSS hover transition - how to remove delay?

    How do I resize an image size automatically loaded in different browsers and screen size?

    How to select all elements that are not of a class within an id css

    css, how to stop an element being squashed by container

    How to add a css to a view in the Controler?

    How to start a css animation from current position

    How to add a background color to HTML option?

    tinymce how to specify the css file to be used for tinymce in another js file

    How to achieve “responsiveness” of this template?

    How do I change the background on mouse over immediately?

    How to create a skin for mediaelement.js?

    How to Make Inline SVG Scale to Parent Element with CSS

    CSS: How to create special shape

    How to add a margin to a paragraph?

    How to fade loop background images in Twitter's Bootstrap 3

    How can I place a checkbox within a button? [closed]

    How can I set a css property to tags with specific attribute?

    How to make bootstrap css input add-on button and error span look good

    How can I add more images to my HTML5/CSS3 Slideshow

    How to create this quote box with (preferably) HTML5/CSS3?

    How to assign a unique CSS id to each cell in a jqGrid?

    how to make this slide menu work

    How to toggle div and up-down arrow heads using css only

    PHP: How to add a CSS text-align property to an already present inline style attribute of an element using simple_html_dom parser?

    How to align divs right and left while using the CSS ghost element technique for vertical centering?

    How to apply default CSS styling to all HTML pages

    How to display html with css stylesheet in TextView?

    How can you hide the title tag using CSS?