-
AuthorPosts
-
matgray87 Friend
matgray87
- Join date:
- November 2011
- Posts:
- 159
- Downloads:
- 0
- Uploads:
- 17
- Thanks:
- 33
- Thanked:
- 8 times in 1 posts
March 25, 2014 at 11:57 pm #196166Hi,
I am trying to create the top header and menu across 100% of the width of the screen, and also appear fixed. I can create this bydiv#top-header.t3-top-header {
position: fixed;
width: 100%;
background-color: #222222;
z-index: 300;
top: 0;
}
and
.t3-mainnav {
border: none;
margin-bottom: 0;
border-radius: 0;
z-index: 100;
position: fixed;
top: 40px;
width: 100%;
background-color: #ffffff;
}
however, this throws the positioning of the rest of the site.
Any suggestions how to fix this?
Do I need to move the top-header and header into a separate block below, or is it just a case of adding a 120px top-margin somewhere?
<div class="t3-wrapper home"> <!-- Need this wrapper for off-canvas menu. Remove if you don't use of-canvas -->
<?php $this->loadBlock('top-header') ?>
<?php $this->loadBlock('header') ?>
<?php $this->loadBlock ('slideshow') ?>
<?php $this->loadBlock('mainbody-home') ?>
<?php $this->loadBlock ('masshead') ?>
<?php $this->loadBlock('footer') ?>
</div>
Thanks,
Mattchavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
March 26, 2014 at 5:18 am #528178Open this File : templatesja_biztplsblockshead.php
Add this code
<script src="http://stickyjs.com/jquery.sticky.js"></script>
<script>
jQuery(document).ready(function(){
jQuery("#t3-mainnav").sticky({topSpacing:0});
});
</script>
<style>
.is-sticky #t3-mainnav {
width:100%;
}
</style>matgray87 Friendmatgray87
- Join date:
- November 2011
- Posts:
- 159
- Downloads:
- 0
- Uploads:
- 17
- Thanks:
- 33
- Thanked:
- 8 times in 1 posts
March 26, 2014 at 9:39 am #528213Thanks Chavan – is there a way to do it with just CSS?
Cheers
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
March 26, 2014 at 1:33 pm #528250yes, there is another way to get this done, please check this tutorial http://t3-framework.org/documentation/menu-system.html#sticky-menu
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
March 26, 2014 at 4:35 pm #528272@matgray87: If you want to full width (100%) top header and menu, you have to change with my suggest below
+ menu
Open templates/ja_biz/tpls/blocks/top-header.php file and remove container div, find and remove line 18: <div class=”container”> and line 57: </div>
+ top-header
Open templates/ja_biz/tpls/blocks/header.php file and remove container div, find and remove line 25: <div class=”container”> and line 76: </div>
Hope it helps
-
AuthorPosts
This topic contains 5 replies, has 3 voices, and was last updated by Ninja Lead 10 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum