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
![[Image: images.jpg]](https://camo.mybb.com/9e3b5ee6c2c858b01f39bebcff71fad52512cd1e/687474703a2f2f342e62702e626c6f6773706f742e636f6d2f2d436269684a4e4a6f5074302f56664a34794147624f38492f414141414141414145594d2f665a6f4835524a725958632f73313630302f696d616765732e6a7067)
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>