-
AuthorPosts
-
December 1, 2010 at 2:49 pm #156961
Hello Joomlart Team and all members,
First of all thanks for that great T3 FrameWork 2.0I have a complex question:
How can I give the block-inner divs the same height of left block??
Here is what I wrote on my layout
<blocks name="middle" colwidth="33" fixheight="1">
<block name="right1" block-inner="3">left</block>
<block name="right2" block-inner="3">right</block>
</blocks>
let say our generated html code will be
<div id=”ja-right1″ style=”width: 50%; min-height: 1125px;” class=”ja-col ja-right1 column”>
<div class=”block-inner1″>
<div class=”block-inner2″>
<div class=”block-inner3 clearfix”>
<div id=”Mod48″ class=”ja-moduletable moduletable clearfix”>
<h3><span>Lorem ipsum</span></h3>
<div class=”ja-box-ct clearfix”>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque et augue vitae nisl viverra laoreet. Donec ut ligula mauris, eu fringilla est. Aliquam luctus, elit eu pellentesque blandit, sapien massa ullamcorper dui, vitae aliquet arcu nunc non odio. Donec porta lacus non est commodo in volutpat massa sagittis.
</p>
</div>
</div>
</div>
</div>
</div>
</div>I want to give (block-inner1, block-inner2 and block-inner3) divs the same height of id “ja-right1” which is “min-height: 1125px;”
Thanks
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
December 2, 2010 at 9:01 am #365107Dear gonzela2006,
Can you let me know why you need to make the same height for those element ? the height of id “ja-right1” as well other columns they are set in javascript function of the core framework.
It is quite complicated and you can try as following to get it
Go to the file of plugins/system/jat3/base-themes/default/js/core.js file,looking for the below ja codes
[PHP] els.each(function(el, i){
if (!el) return;
if (height-el.getStyle(‘padding-top’).toInt()-el.getStyle(‘padding-bottom’).toInt() > 0) el.setStyle(‘min-height’, height-el.getStyle(‘padding-top’).toInt()-el.getStyle(‘padding-bottom’).toInt());
});[/PHP] You can change it to
[PHP] els.each(function(el, i){
if (!el) return;
if (height-el.getStyle(‘padding-top’).toInt()-el.getStyle(‘padding-bottom’).toInt() > 0)
{el.setStyle(‘min-height’, height-el.getStyle(‘padding-top’).toInt()-el.getStyle(‘padding-bottom’).toInt());
el.getElements(‘div’).each(function(item,i){
if(item.getProperty(‘class’).contains(‘block-inner’)) { item.setStyle(‘min-height’, height-el.getStyle(‘padding-top’).toInt()-el.getStyle(‘padding-bottom’).toInt()); }})
}
}); [/PHP] I do hope it would help !1 user says Thank You to Sherlock for this useful post
December 5, 2010 at 8:07 am #365288<em>@dathq 206390 wrote:</em><blockquote>
Go to the file of plugins/system/jat3/base-themes/default/js/core.js file,looking for the below ja codes
[PHP] els.each(function(el, i){
if (!el) return;
if (height-el.getStyle(‘padding-top’).toInt()-el.getStyle(‘padding-bottom’).toInt() > 0) el.setStyle(‘min-height’, height-el.getStyle(‘padding-top’).toInt()-el.getStyle(‘padding-bottom’).toInt());
});[/PHP] You can change it to
[PHP] els.each(function(el, i){
if (!el) return;
if (height-el.getStyle(‘padding-top’).toInt()-el.getStyle(‘padding-bottom’).toInt() > 0)
{el.setStyle(‘min-height’, height-el.getStyle(‘padding-top’).toInt()-el.getStyle(‘padding-bottom’).toInt());
el.getElements(‘div’).each(function(item,i){
if(item.getProperty(‘class’).contains(‘block-inner’)) { item.setStyle(‘min-height’, height-el.getStyle(‘padding-top’).toInt()-el.getStyle(‘padding-bottom’).toInt()); }})
}
}); [/PHP] I do hope it would help !</blockquote>Thank you very MUCHHHH
it works great<em>@dathq 206390 wrote:</em><blockquote>Dear gonzela2006,
Can you let me know why you need to make the same height for those element ?
</blockquote>
I have a design which have more than one backgroud (three background). these backgrounds applied for “ja-right1”, “ja-right2”, “ja-left1” and “ja-left2” so the solution is to wrap thoses divs so they can take the same height I tried “block-inner” property but it wraped “ja-right1” content not the “ja-right1” div
if you have a better solution rather than the above, it will be great??I have another problem I want to wrap the “.ja-content-main” with 3 divs to give it the 3 backgrounds how can I do it? I don’t know what to write on the XML layout
Thanks for your time dathq
T3 is the best
December 5, 2010 at 2:42 pm #365309<blockquote>I have another problem I want to wrap the “.ja-content-main” with 3 divs to give it the 3 backgrounds how can I do it? I don’t know what to write on the XML layout
</blockquote>
any help pleaseSherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
December 7, 2010 at 3:12 am #365506Dear gonzela2006,
If you want to wrap the “.ja-content-main” with 3 divs you can try as following
1 ) Copy the file of pluginssystemjat3base-themesdefaultpagedefault.php into the folder
templatesyour_templatepage (you need to create the page folder if it does not exists)2) Open the copied file & search for the Codes below
[PHP] <?php if (!$this->getParam (‘hide_content_block’, 0)): ?>
<div id=”ja-content-main” class=”ja-content-main clearfix”>
<?php echo $this->showBlock (‘content’) ?>
</div>
<?php endif ?>[/PHP] Here you can wrap the .ja-content-main by the divs as you want1 user says Thank You to Sherlock for this useful post
hjames Friendhjames
- Join date:
- March 2010
- Posts:
- 82
- Downloads:
- 475
- Uploads:
- 3
- Thanked:
- 8 times in 2 posts
December 29, 2010 at 4:06 pm #369155This thread helped me to remove the constant height in my template which was also being controled by core.js.
Thank you!
James -
AuthorPosts
This topic contains 8 replies, has 4 voices, and was last updated by hjames 13 years, 12 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum