-
5 Apr 2012 4:34 AM #1
Xtemplate and html
Xtemplate and html
Hi all
I want a reactangular box whose hieght should automatically be adjusted according to the values in value_a_1.
For ex let say value_a_1 = hello +<br>+welcome+<br>thisandthat;
so reactangular box should cover three lines.
The code below covers only one line.
Plz help
The CSS filesCode:var all = new Ext.XTemplate( '<div class="line">', '<div class="impact">', '<ul>', '<li><li>', '<li>line 1<li>', '<li><li>', '</ul>', '</div>', '<div class="open">', '<ul>', '<li>{value1}<li>', '<li>{value2}<li>', '<li>{value3}<li>', '</ul>', '</div>', '<div class="closed">', '<ul>', '<li>{value_a_1}<li>', '<li>{value_b_1}<li>', '<li>{value_c_1}<li>', '</ul>', '</div>', '<div class="inprog">', '<ul>', '<li>{value_a_2}<li>', '<li>{value_a_2}<li>', '<li>{value_a_2}<li>', '</ul>', '</div>', '<div class="reassign">', '<ul>', '<li>{value_a_3}<li>', '<li>{value_a_3}<li>', '<li>{value_a_3}<li>', '</ul>', '</div>', '<div class="resolved">', '<ul>', '<li>{value_a_4}<li>', '<li>{value_a_4}<li>', '<li>{value_a_4}<li>', '</ul>', '</div>', '</div>' );
Code:.line{ padding-top: 2px !important; height:24px; background:#cdcdcd; border : 1px solid #657892; border-radius: 10px; } .impact{ float: left; clear:left; margin-left: 2%; text-align:center; } .open { float: left; margin-left: 15%; text-align:center; } .closed { float: left; margin-left: 11%; text-align:center; } .inprog { float: left; margin-left: 11%; text-align:center; } .reassign{ float: left; margin-left: 11%; text-align:center; } .resolved{ float: left; margin-left: 11%; text-align:center; }Last edited by mitchellsimoens; 5 Apr 2012 at 8:38 AM. Reason: added [CODE] tags
-
5 Apr 2012 8:39 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
The line div has a set height. If you want auto height then you shouldn't set a height.
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.
-
5 Apr 2012 7:29 PM #3
Re
Re
.line{
padding-top: 2px !important;
height:24px; // removed this line
background:#cdcdcd;
border : 1px solid #657892;
border-radius: 10px;
}
I have removed this line as you mentioned but still it not working
-
7 Apr 2012 11:56 PM #4
Floated child items will not give the parent "div.line" layout.
Various styles will cause the it to have layout.
http://www.satzansatz.de/cssd/onhavinglayout.htmlSearch the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
8 Apr 2012 10:44 PM #5
Is there any other method by which i can put my data in tabular form without using table html tag as i heard that data inside the table tag will get overlapped with each other when we see the output on ipad or iphone.
Here the purpose of using the float property and list tag is just to give it a tabular stucture.


Reply With Quote