MyBB Community Forums

Full Version: new button at the nav
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello Guys



i want to ask how i can add new button for another link such as rules or donate

to be with the same style

like this one



[attachment=42631]



i have try to do it but it looks like this one



[attachment=42632]





i am using BootBB template

thanks in advance
you have to use style properties similar to other buttons of same menu.
what is your forum url ?
(2020-03-04, 11:12 AM).m. Wrote: [ -> ]you have to use style properties similar to other buttons of same menu.
what is your forum url ?
hi sir
thank you so much for your reply
this is my url
http://autoayf.com

i changed the template because i have some issue with the bootbb template and i sent a post to Anurag M to see the problem
^ you have to use btn class for your newly added header top links
code can be similar to below
<a class="btn btn-donate" href="______________"
(2020-03-04, 11:44 AM).m. Wrote: [ -> ]^ you have to use btn class for your newly added header top links
code can be similar to below
<a class="btn btn-donate" href="______________"
hi sir
thank you so much

didn't work for me , can you please help me with the code

this is my header_welcomeblock_member

{$usercplink}
{$modcplink}
{$admincplink}
{$pmslink}
{$buddylink}

<a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}" class="register btn btn-xs btn-danger" style="color: #fff;" data-toggle="tooltip" data-placement="bottom" title="{$lang->welcome_logout}"><i class="fa fa-sign-out"></i><span class="hidden-xs"> {$lang->welcome_logout}</span></a>
	
<span class="float_right hidden-xs">{$lang->welcome_back} </span>
what was the earlier code which you used for Donate & Rules buttons ?
i used this one

{$usercplink}
{$modcplink}
{$admincplink}
{$pmslink}
{$buddylink} <span style="background-color: #000000"><font color="#FFFFFF">&nbsp;</font></span><a href="http://autoayf.com/donate.php"><span style="text-decoration: none; font-weight: 700; background-color: #000000"><font color="#FFFFFF">Donate</font></span></a><font color="#FFFFFF"><span style="background-color: #000000">&nbsp; </span>&nbsp;
</font><span style="background-color: #FFFF00">&nbsp;&nbsp;
<a href="http://autoayf.com/announcements.php?aid=1">
<span style="text-decoration: none; font-weight: 700"><font color="#000000">
Rules</font></span></a>&nbsp; </span>&nbsp;&nbsp;&nbsp; <i class="fa fa-sign-out">&nbsp; </i><span class="hidden-xs"> &nbsp;<a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}" class="register btn btn-xs btn-danger" style="color: #fff;" data-toggle="tooltip" data-placement="bottom" title="{$lang->welcome_logout}">{$lang->welcome_logout}</a></span>
	
<span class="float_right hidden-xs">{$lang->welcome_back} </span>
<span style="background-color: #000000"><font color="#FFFFFF">&nbsp;</font></span><a href="http://autoayf.com/donate.php"><span style="text-decoration: none; font-weight: 700; background-color: #000000"><font color="#FFFFFF">Donate</font></span></a><font color="#FFFFFF"><span style="background-color: #000000">&nbsp; </span>&nbsp;
</font><span style="background-color: #FFFF00">&nbsp;&nbsp;
<a href="http://autoayf.com/announcements.php?aid=1">
<span style="text-decoration: none; font-weight: 700"><font color="#000000">
Rules</font></span></a>&nbsp; </span>&nbsp;&nbsp;&nbsp;

replace with :
<a class="btn btn-donate" href="http://autoayf.com/donate.php">Donate</a>
<a class="btn btn-rules" href="http://autoayf.com/announcements.php?aid=1">Rules</a>

add to bottom of global.css of bootBB theme
.btn-donate {background-color: #000000; color: #FFFFFF; 
text-decoration: none; font-weight: 700;}
.btn-rules {background-color: #FFFF00; color="#000000;
text-decoration: none; font-weight: 700;}

note: edit the stylesheet in forum admin panel (through themes section) AND in advanced edit mode (tab)

remember hard refreshing your browser [eg. press CTRL + F5] on forum index after saving changes to the stylesheet
thank you so much sir

http://autoayf.com/

it works great , but how i can make the size as the other button
Add this
padding: 15px 32px;
on your button css style.
for example
if you want to make bigger the register button go to buttons.less at line 11
and add it
it will be like this
.btn-success {
    color: #fff;
    background-color: #5cb85c;
    border-color: #4cae4c;
    padding: 15px 32px;
}
you do the same to the other buttons
Pages: 1 2