MyBB Community Forums

Full Version: Add icons to right of header
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
hi friends,
i have a new theme for my forum,for which i want to add a facebook icon and a twitter icon,to the right side of header.

by searching i got a tutorial ,which i tried but failed.

<a name="top" id="top">
<div id="contenedor">
	<div id="cabecera">
<div class="float_right"><a href="http://www.facebook.com/pages/Mim-s-pace/132559566797948/" target="_blank"" title="mimspace facebook page"><imgsrc="http://www.mimspace.co.cc/images/image/facebookme.gif" /></a></div>
<div class="float_right"><a href="http://www.twitter.com/mimspace" target="_blank" title="mimspace twitter"><imgsrc="http://www.mimspace.co.cc/images/image/twitterme.gif" /></a></div>
		<h1><a href="{$mybb->settings['bburl']}/" id="logo"><span>Mimspace</span></a></h1></a>
		<ul id="menu">

i tied add this code in header template of my theme,but this did not work.

is there any css edits that i should make if so can anyone help me in fixing this?
you mean show up them on right side of the header( right align) and not center align?

If so before your icon/image code,add:

<div align="right">YOUR CODE HERE</div>
that code doesnot work,i want images within header not above or below,and the icons should float,like the search box in this forum mybb.com which is within header.

anyway thank you for responding.

can anyone please help me
LoL! I did something like this manipulating template edits,like this or like the one you want only?

[Image: dIJSd.png]
nope bro,i want the image floating over the header to the right side.
not below the header or above the header.

the one u tried is below the header the search box.

i think i have to make some css edits,can anyone help
I developed again something,it has no images,but basic functions and is pretty impressive as well,what about this? :

[Image: aF7mN.png]
yeah dat is good one so did u make any css edits? or can u help me in that code?
Yes I did some sorta template edits and a bit CSS,to make it work:

1. Login your ACP>Themes & Templates>Templates>YOUR THEME TEMPLATES>Header Templates>Header

2. In it find:

<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a>
(mostly second line after <div id="header">,it maybe different according to different themes,but just make sure you find the ending </a> and before the </div> closes add the following code:

<div style="float:right;">

<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<tr>
<td class="thead"><strong>Search</strong> <span class="smalltext"><a href="search.php">(advanced search)</a></span></td>
</tr>
<tr>
<td class="trow1" align="center">
<form method="post" action="search.php">
<input type="hidden" name="action" value="do_search" />
<input type="hidden" name="postthread" value="1" />
<input type="hidden" name="forums" value="all" />
<input type="hidden" name="showresults" value="threads" />
<input type="text" class="textbox" name="keywords" value="" />
<!-- start: gobutton --> 
<input type="submit" class="button" value="Go" /> 
<!-- end: gobutton -->
</form>
</td>
</tr>
</table>
</div>

Do let me know if you encounter any problem,Hum Haina Toungue
@crazy4cs : yeah you are right but i want to add icons,i tried the code and only one icon worked out of two.
i have facebook and twitter icons to be added.

if u want u can have a look : www.mimspace.co.cc

@markw7 : the links to be inserted into header as a floating one,not in top menu,top links
Pages: 1 2