-
13 Nov 2012 10:33 PM #1
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.
-
Best Answer Posted by bricemason
revilo78,
You had said
Given your example, to specifically target your configuration you'd use:
I tried using .showslist-list-item > .showslist-dock-horizontal > .showslist-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.Code:.showslist .x-list-item > .x-dock-horizontal > .x-dock-body
Brice
-
15 Nov 2012 9:55 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
- Answers
- 3113
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
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
15 Nov 2012 7:08 PM #3
revilo78,
You had said
Given your example, to specifically target your configuration you'd use:
I tried using .showslist-list-item > .showslist-dock-horizontal > .showslist-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.Code:.showslist .x-list-item > .x-dock-horizontal > .x-dock-body
BriceBrice 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.


Reply With Quote