Reputation: 277
I've playing around with Sencha Touch for the first time however having difficulties in styling images (i.e. center) and text (i.e. making a certain size/colour).
Could someone please tell me where I add style tags.
Example item below:
// This is the home page, just some simple html
{
title: 'Home',
iconCls: 'home',
cls: 'home',
scrollable: true,
style: 'text-align:centre',
html: [
'<img height=260 src="http://upload.wikimedia.org/wikipedia/commons/4/4a/Logo_2013_Google.png"/>',
'<h1>Welcome to the Demo HTML5 App</h1>',
"<p>Built with Sencha Touch</p>"
].join("")
}
Upvotes: 0
Views: 430
Reputation: 179
I agree with arthurkay but if you want to use inline styling you should change ...
style: 'text-align:centre'
... to ...
style: 'text-align:center'
Upvotes: 0
Reputation: 5651
The idea here is not to use STYLE tags... you're assigning a "cls" to the component, which is just a CSS class. Build your styles with CSS:
.home img {}
.home h1 {}
.home p {}
Upvotes: 1