-
AuthorPosts
-
October 12, 2011 at 2:48 pm #169598
I’m using the ‘default’ profile in all the pages of my site except for a page where I want to keep the top bar and the menu only. Then, the rest of the middle content should be an iframe (wrapper) without any left and right margin. So, I have created a new profile with a specified width (100%), but the result is not that good, as you can see from the attachment:
1) the menu and the top banner are not centered, as on the rest of the site where the template width is set as “wide”, but it is left aligned, no more centered as before.
2) it seems that there is no way to completely remove the left and right margins (the ones in light blue) so that the iframe might appear as completely included in my site. I’ve seen that there are no margins in the ‘iphone’ profile, so maybe I should copy some of the settings from that profile to get what I want.
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
October 12, 2011 at 5:32 pm #418828Hi,
Could you give me a link to your website?October 12, 2011 at 8:00 pm #418895www DOT hyp2012 DOT eu
Thanks
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
October 13, 2011 at 5:28 pm #419124You replace this code from /components/com_wrapper/views/wrapper/tmpl/default.php
<script type="text/javascript">
function iFrameHeight() {
var h = 0;
if (!document.all) {
h = document.getElementById('blockrandom').contentDocument.height;
document.getElementById('blockrandom').style.height = h + 60 + 'px';
} else if (document.all) {
h = document.frames('blockrandom').document.body.scrollHeight;
document.all.blockrandom.style.height = h + 20 + 'px';
}
}
</script>
with
<script type="text/javascript">
$('ja-container').setAttribute('class',$('ja-container').getAttribute("class")+' iframe');
function iFrameHeight() {
var h = 0;
if (!document.all) {
h = document.getElementById('blockrandom').contentDocument.height;
document.getElementById('blockrandom').style.height = h + 60 + 'px';
} else if (document.all) {
h = document.frames('blockrandom').document.body.scrollHeight;
document.all.blockrandom.style.height = h + 20 + 'px';
}
}
</script>
You add this code into /templates/ja_social/css/template.css
.iframe .main{
max-width:none;
}October 13, 2011 at 5:47 pm #419131Thank you! The margins have finally disappeared. Unfortunately the top bar is still left aligned instead of centred, as in the rest of the site, but it’s not that important.
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
October 14, 2011 at 3:04 am #419212I reviewed your website and I realize that LOGISTICS AND REGISTRATION page has
/*dynamic css*/body.bd .main {width: 100%;}
body.bd #ja-wrapper {min-width: 100%;}
another pages have
/*dynamic css*/body.bd .main {width: 950px;}
body.bd #ja-wrapper {min-width: 950px;}
I guess that you changed default configuration of LOGISTICS AND REGISTRATION. If you give me username+password of backend, I will solve it.khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
October 14, 2011 at 12:05 pm #419308I remove row 92 in PROFILE OVERRIDE SETTINGS, so margin appears again. Because I can’t modify your template.css, so you add this code into /templates/ja_social/css/template.css
body.bd #ja-container .main
{
width:100%;
}
October 14, 2011 at 1:00 pm #419316I think I didn’t explain properly what I wanted to get, because with the last thing you asked me to modify the home page is too large. What I would like to have is:
– all the pages have the jasocial default profile, maincontent-let-right, with margins on the left and on the right, just like the demo version
– only in my Logistics page, as I need to insert an iframe which is a bit larger than the current jasocial main content (the position used for articles), I was trying to find a way to have that page only to be 100% wide, without any margins (I wouldn’t like to have horizontal scrollbars in my iframe)
– I managed to do this, but all the section above the main content (horizontal menu, logo and so on…) are left aligned instead of centered aligned, as in the rest of the site. Can it be fixed? Or is this due to the iframe I inserted?thank you
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
October 14, 2011 at 1:15 pm #419322Oh, I’m very very sorry.
I have a mistake. I review your configuration for Logistics, thank you. Now, you just add this code into template.css
body.bd #ja-container .main
{
width:100%;
}October 14, 2011 at 1:24 pm #419326I’ve added the code but the result is still the same: larger home page, narrow Logistics. Do I have to apply a different profile for Logistics?
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
October 14, 2011 at 1:50 pm #419332You change
body.bd #ja-container .main
to
body.bd #ja-container.iframe .main
You clean cache by delete all of files of /cache and /t3-assess.1 user says Thank You to khoand for this useful post
October 14, 2011 at 2:00 pm #419339Ok, that’s exactly what I wanted! Thank you
AuthorPostsViewing 12 posts - 1 through 12 (of 12 total)This topic contains 12 replies, has 2 voices, and was last updated by infomathmods 13 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Reduce left and right margins with wrapper
Viewing 12 posts - 1 through 12 (of 12 total)