Results 1 to 3 of 3

Thread: Using baseCls on a list with Sencha 2.1

  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    15
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      0  

    Default

    This is coloring the list body for me:

    Code:
    .x-list-item > .x-dock-horizontal > .x-dock-body {
        background : red;
    }
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #3
    Sencha User bricemason's Avatar
    Join Date
    Jan 2008
    Location
    Upstate NY
    Posts
    280
    Answers
    49
    Vote Rating
    46
      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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •