MyBB Community Forums

Full Version: background
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
hello friends ..

how can this be a background img src :

<img src="{$theme['imgdir']}/ficon/icon_{$forum['fid']}_{$lightbulb['folder']}.png" 
That's not the image source for your background image.

Also, you seem to forgot to add a greater-than (>) at the end of your code. So your code should be

<img src="{$theme['imgdir']}/ficon/icon_{$forum['fid']}_{$lightbulb['folder']}.png">
Arbaz hello.

This code for forumbit_depth2_forum.

I will give full code:
<tr>
<td class="{$bgcolor}" align="center" valign="top" width="1"><img src="{$theme['imgdir']}/ficon/icon_{$forum['fid']}_{$lightbulb['folder']}.png" rel="nofollow" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td>
<td class="{$bgcolor}" valign="center">
<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="{$bgcolor}" valign="center" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" valign="center" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
<td class="{$bgcolor}" valign="center" align="right" style="white-space: nowrap">{$lastpost}</td>
</tr>

how to turn it into a background. ?
Hi,

What do you mean by turn it into a background? What are you trying to accomplish?
I want to change the icon image forums, a background.
So you would like to change the icons before your forum name and description? Such as the on, off and offlock icons?
ya.

I want to make, forum icon into the background.
So you want to add a transparent background image or would you like to know how to replace the image with your own?
Arbaz hello.

I want to make it like this:
background: url (images/test.gif) no-repeat;

but how to insert the code background there?
You'll have to add your own class. But not on the img tag but on its container.
In this example I added a custom-icon class. You're not going to delete anything just add the new class.
<td class="custom-icon {$bgcolor}" >
   <img src="{$theme['imgdir']}/ficon/icon_{$forum['fid']}_{$lightbulb['folder']}.png">
</td>
Though you might want to remove the img tag if you're not going to use it.

Then when you edit the theme global.css you can add this at the bottom using advance mode.
.custom-icon {
   background: url(images/test.gif) no-repeat;
}
Pages: 1 2