Friday, January 27, 2012

Custom Scrollbars

 
/**
 * Copyright 2008-2011 The Aydniv Software Company.
 *
 * @author nuwan.bandara
 * @since November, 2010
 * @version 1.0
 */

html {
    overflow-y: auto;
    /* Kudos to @sami for pointing out that setting the overflow to "auto" instead of "hidden" fixes the keyboard nav bug! */
    background-color: transparent;
}

@media only screen and (max-device-width:480px) {
    html {
        overflow: auto;
    }
}

body.custom {

    background-position: center top;
    background-image: url(images/bg.jpg);
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
        left: 0;
        bottom: 0;
        right: 10px;
    overflow-y: scroll;
    overflow-x: hidden;
}


::-webkit-scrollbar {
    width: 10px;
    height: 6px;
}

::-webkit-scrollbar-button:start:decrement,
::-webkit-scrollbar-button:end:increment {
    height: 30px;
    display: block;
    background-color: transparent;
}

::-webkit-scrollbar-track-piece {
    background-color: #3b3b3b;
    -webkit-border-radius: 6px;
}

::-webkit-scrollbar-thumb:vertical {
    height: 50px;
    background-color: #666;
    -webkit-border-radius: 6px;
}

::-webkit-scrollbar-thumb:horizontal {
    width: 50px;
    background-color: #666;
    -webkit-border-radius: 3px;
}

Labels:

Wednesday, January 18, 2012

DHTMLX Grid -> Vertical Align Cell Text

CSS
div.gridbox table.obj td {
    vertical-align: top;
}

OR JS

myGrid.setCellTextStyle(rowId, cellIndex, "vertical-align:top;padding-top:2px");

Labels: ,

Friday, December 9, 2011

Editable DIV

CSS
        div.editableContent {
            width: 390px;
            height: 561px;
            border: 1px solid #ccc;
            background-color: white;
        }
HTML
    
Useful Attribute
    mailSubject.contentEditable = true;
    mailContent.contentEditable = true;

Labels: , ,