2015-08-20, 10:10 AM
Hello guys, Im building a gaming community website and I decided to make myBB look alike the main website. So far I had good progress but I got stuck with the main menu thing. I want the same as the website. Managed to get some changes (disabled the default, added the new one) and I ran into some problems. The code that I have for the main website wont exactly work with myBB. Menu background Images, rollover menus, and dropdown wont work.
I was aiming to make it work with the website menu css (and of course I coded/changed the header.php and made sure all paths are correct) but I guess it wasnt so simple.
Can anyone provide some insight??? I do have coding skills (game dev) but my web developing ones are not the best.
(I thought of writing everything from scratch based on some other forum threads, but before I get to that point I wonder if there is something to do with those codes)
Bellow you will find screenshots and the code I used.
what im aiming for: http://i.imgur.com/bHflz2X.png
and where i managed to get: http://i.imgur.com/iV52K6Q.jpg
(theme is iGame by iAndrew and I modified lots of stuff in the looks)
Demo of the website template to see how the menu works.
Demo Site
the css part of the header/menu/social stuff
I was aiming to make it work with the website menu css (and of course I coded/changed the header.php and made sure all paths are correct) but I guess it wasnt so simple.
Can anyone provide some insight??? I do have coding skills (game dev) but my web developing ones are not the best.
(I thought of writing everything from scratch based on some other forum threads, but before I get to that point I wonder if there is something to do with those codes)
Bellow you will find screenshots and the code I used.
what im aiming for: http://i.imgur.com/bHflz2X.png
and where i managed to get: http://i.imgur.com/iV52K6Q.jpg
(theme is iGame by iAndrew and I modified lots of stuff in the looks)
Demo of the website template to see how the menu works.
Demo Site
the css part of the header/menu/social stuff
/* -----------------------------------------
Header
----------------------------------------- */
#logo {
margin:0px auto;
width:960px;
text-align:center;
}
#logo img {
margin-top:70px;
border:0;
}
#social_ctn {
padding:60px 0px 0px 0px;
text-align:center;
width:960px;
height:37px;
background:url(../images/cmenu/social_ctn_loop.png) bottom left repeat-x;
}
#social_ctn a {
display:inline-block;
height:36px;
margin:0px -3px 0px 0px;
width:42px;
}
#social_ctn img {
margin-top:0 !important;
}
#social_ctn a.social_t{
width:31px !important;
}
#social_ctn a:hover {
background-position:0px -36px;
}
#facebook {
background:url(../images/cmenu/facebook.jpg) top left no-repeat;
}
#rss{
background:url(../images/cmenu/rss.jpg) top left no-repeat;
}
#twitter{
background:url(../images/cmenu/twitter.jpg) top left no-repeat;
}
#google_plus{
background:url(../images/cmenu/google_plus.jpg) top left no-repeat;
}
#you_tube{
background:url(../images/cmenu/you_tube.jpg) top left no-repeat;
}
/* -----------------------------------------
Menu
----------------------------------------- */
#menu_wrapper{
height:auto;
width:960px;
}
#menu_left, #menu_right{
width:2px;
height:66px;
float:left;
}
#menu_left{
background:url(../images/cmenu/menu_left.jpg) top left no-repeat;
}
#menu_right{
background:url(../images/cmenu/menu_right.jpg) top left no-repeat;
}
ul#menu{
height:66px;
width:956px;
float:left;
background:url(../images/cmenu/menu_loop.jpg) top left repeat;
padding:0;
margin:0;
list-style:none;
}
ul#menu li{
float:left;
height:66px;
padding:0px 2px 0px 0px;
background:url(../images/cmenu/menu_divider.jpg) top right no-repeat;
}
ul#menu li a{
font-family: 'Oswald', Helvetica, Arial, sans-serif;
font-weight:700;
font-size:14px;
text-transform:uppercase;
display:block;
height:46px;
color:#fff;
padding:20px 20px 0px 20px;
text-decoration:none;
text-shadow: 0px 2px 3px rgba(0, 0, 0, 1);
background:url(../images/cmenu/menu_hover.png) top left repeat-x;
}
ul#menu li a:hover{
text-shadow: 0px 2px 3px rgba(0, 0, 0, 1);
text-decoration:none;
color:#ccc;
background-position:0px -66px;
}
/*style the sub menu*/
#menu li ul {
position:absolute;
z-index:9999;
visibility:hidden;
background:url(../images/wrapper_loop.jpg) repeat top left #1c1c1c;
border:5px solid #212121;
margin:0;
padding:5px 0px 5px 0px;
width:200px;
-webkit-box-shadow: 0px 2px 5px 2px rgba(0, 0, 0, 75);
box-shadow: 0px 2px 5px 2px rgba(0, 0, 0, 75);
}
#menu li ul li {
height:auto;
background:none;
margin:0px 10px 0px 10px;
padding:0;
float:none;
background:url(../images/menu_drop.jpg) bottom left repeat-x;
}
#menu li ul li.drop_last{
background:none;
}
#menu li ul li a:link, .myMenu li ul li a:visited {
color:#fff;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
height:auto;
padding:10px 15px 10px 5px;
width:auto;
text-transform:capitalize;
font-weight:normal;
transition:color 0.15s ease-in-out, padding 0.15s ease-in-out;
/* Firefox 4 */
-moz-transition:color 0.15s ease-in-out, padding 0.15s ease-in-out;
/* Safari and Chrome */
-webkit-transition:color 0.15s ease-in-out, padding 0.15s ease-in-out;
/* Opera */
-o-transition:color 0.15s ease-in-out, padding 0.15s ease-in-out;
}
#menu li ul li a:hover {
font-weight:normal;
background:none;
color:#2ac0ff;
padding-left:10px;
transition:color 0.15s ease-in-out, padding 0.15s ease-in-out;
/* Firefox 4 */
-moz-transition:color 0.15s ease-in-out, padding 0.15s ease-in-out;
/* Safari and Chrome */
-webkit-transition:color 0.15s ease-in-out, padding 0.15s ease-in-out;
/* Opera */
-o-transition:color 0.15s ease-in-out, padding 0.15s ease-in-out;
}
/*end menu*/
And the header.php part of it.<div id="logo"> <a href="#"><img alt="alt_example" src="./images/cmenu/logo.png"></a>
<div id="social_ctn">
<a class="social_t"><img alt="alt_example" src="./images/cmenu/social_tleft.png"></a>
<a href="#" id="rss"><img alt="alt_example" src="./images/cmenu/blank.gif" height="37px" width="100%"></a>
<a href="#" id="facebook"><img alt="alt_example" src="./images/cmenu/blank.gif" height="37px" width="100%"></a>
<a href="#" id="twitter"><img alt="alt_example" src="./images/cmenu/blank.gif" height="37px" width="100%"></a>
<a href="#" id="google_plus"><img alt="alt_example" src="./images/cmenu/blank.gif" height="37px" width="100%"></a>
<a href="#" id="you_tube"><img alt="alt_example" src="./images/cmenu/blank.gif" height="37px" width="100%"></a>
<a class="social_t"><img alt="alt_example" src="./images/cmenu/social_tright.png"></a>
</div>
</div>
<div id="menu_wrapper">
<div id="menu_left"></div>
<ul id="menu">
<li><a href="./index.html">Home</a></li>
<li><a href="./banner2.html">Forum</a></li>
<li><a>Games</a>
<ul>
<li><a href="#">Submenu example 1</a></li>
<li><a href="#">Submenu example 2</a></li>
<li><a href="#">Submenu example 3</a></li>
<li class="drop_last"><a href="#">Submenu example 4</a></li>
</ul>
</li>
<li><a href="./post_list.html">Teams</a></li>
<li><a href="./post.html">Community</a></li>
<li><a href="./post_game.html">Media</a></li>
<li><a href="./contact.html">Contact</a></li>
</ul>
<a style="width: 940px;" href="#" id="pull"></a>
<div id="menu_right"></div>
<div class="clear"></div>
</div>