1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    15
    Vote Rating
    0
    revilo78 is on a distinguished road

      0  

    Default Answered: Using baseCls on a list with Sencha 2.1

    Answered: Using baseCls on a list with Sencha 2.1


    I've updated my app to use Sencha 2.1, but unfortunately can't get the CSS to work properly on my lists. Previously, I set a baseCls = "showslist" and was able to get a list of images to display correctly with the following CSS:

    .showslist {
    text-align: center;
    font-weight: bold;
    font-size: large;
    }

    .showslist-item {
    display: inline-block;
    float: left;
    margin: 6px 2% 0px 2%;
    max-width: 100%;
    width: 40%;
    }


    .showslist-item img {
    max-width: 100%;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    }

    Sencha's blog post mentions that '.x-list-item' changed to '.x-list-item > .x-dock-horizontal > .x-dock-body'

    I tried using .showslist-list-item > .showslist-dock-horizontal > .showslist-dock-body and many other methods, but had no luck in adjusting the CSS of anything in my list. Any suggestions to what I am doing wrong?

    Thanks for your time.

  2. revilo78,

    You had said

    I tried using .showslist-list-item > .showslist-dock-horizontal > .showslist-dock-body
    Given your example, to specifically target your configuration you'd use:

    Code:
    .showslist .x-list-item > .x-dock-horizontal > .x-dock-body
    To get a better handle on how baseCls is being applied, I'd suggest using the element inspector in Google Chrome and search for the string showslist. This will quickly highlight the css classes that are being applied.

    Brice

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,004
    Answers
    3489
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    This is coloring the list body for me:

    Code:
    .x-list-item > .x-dock-horizontal > .x-dock-body {
        background : red;
    }
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    bricemason's Avatar
    Join Date
    Jan 2008
    Location
    Upstate NY
    Posts
    280
    Answers
    49
    Vote Rating
    44
    bricemason has a spectacular aura about bricemason has a spectacular aura about bricemason has a spectacular aura about

      0  

    Default


    revilo78,

    You had said

    I tried using .showslist-list-item > .showslist-dock-horizontal > .showslist-dock-body
    Given your example, to specifically target your configuration you'd use:

    Code:
    .showslist .x-list-item > .x-dock-horizontal > .x-dock-body
    To get a better handle on how baseCls is being applied, I'd suggest using the element inspector in Google Chrome and search for the string showslist. This will quickly highlight the css classes that are being applied.

    Brice
    Brice Mason
    Front End Developer
    Modus Create

    @bricemason
    bricemason.com

    Sencha Touch Screencasts
    Vimeo - Sencha Touch Channel

    Github Projects:
    Sencha Cordova Builder enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch.

    Am I Sencha Touch Ready? checks your system to determine what you need to do to start Sencha Touch development. If you're having trouble getting up and running, try this out.

    Sencha Tools Bridge allows Sencha SDK Tools to co-exist with Sencha Cmd on the same system.