2015-09-21, 09:06 AM
Do you need a floating Announcement Bar + links, that sticks to the top of your window as you scroll down a page. So this tutorial will help you.
This will work for any versions of mybb.
Adding Codes
Step 1: Locate the custom/default NAvBar location
Step 2 : Admin Cp >> Templates & Styles >> Templates >> your theme >> Header Templates > Edit Header >> Now add the given Codes at the TOP
Now save the codes..
Adding CSS
Step 3: Now go to theme >> your theme >> Add style sheets
File name : onlinedevelopersnoti .css
Attached to : Globally
then choose write my own content. Then paste the css codes given below and save it
Changing the Design:
This will work for any versions of mybb.
Adding Codes
Step 1: Locate the custom/default NAvBar location
Step 2 : Admin Cp >> Templates & Styles >> Templates >> your theme >> Header Templates > Edit Header >> Now add the given Codes at the TOP
Quote:<div class='openbloggernotification' id='onlinedevelopersnoti' style='display: block; margin-top: 0px;'>
<div id='onlinedevelopers'>
(Announcement Here) You can add Links too
</div></div>
Now save the codes..
Adding CSS
Step 3: Now go to theme >> your theme >> Add style sheets
File name : onlinedevelopersnoti .css
Attached to : Globally
then choose write my own content. Then paste the css codes given below and save it
Quote:#onlinedevelopersnoti{
display: none;
margin: 0;
padding: 0;
position: fixed;
margin-top: -41px;
z-index: 999999;
width: 100%;
height: 41px;
}
#onlinedevelopers {
width: 100%;
height: 28px;
margin: 0px;
padding-top: 7px;
text-align: center;
background: none repeat scroll #2E2F2E;
position: relative;
box-shadow:0px 1px 3px #666;
z-index: 9998;
text-decoration: none;
color: #fff;
font-family: arial,sans-serif;
font-size: 13px;
font-weight: bold;
text-shadow: 1px 1px 1px #000;
border-bottom:2px solid #90F128;
}
#onlinedevelopers a{
text-decoration: none;
color:#FFFC00;
font-family: arial,sans-serif;
font-size: 13px;
font-weight: bold;
text-shadow: 1px 1px 1px #000;
outline: none;
}
Changing the Design:
- To change the background color of the bar simply edit #2E2F2E
- To change text color edit #fff
- To Add a site logo insert the image url. The logo Height should not exceed '20' pixel and width not longer that '200' pixel
- You can add link with <a href=' Url ' >Link Name </a>