Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: Davros_Dalek on November 29, 2017, 06:26:00 AM

Title: Centre Forum Header Image in core theme ?
Post by: Davros_Dalek on November 29, 2017, 06:26:00 AM
Hi Guys

I would like to centre the header image i have in the core theme, where about in the index.css would i do this for that theme ?




I have done this successfully in the curve theme index.css by changing this section like so (change in bold)

/* the main title, always stay at 45 pixels in height! */
h1.forumtitle
{
line-height: 45px;
font-size: 1.8em;
font-family: Geneva, verdana, sans-serif;
margin: 0;
padding: 0;
float: left;

text-align: center;


Kind Regards
Craig
Title: Re: Centre Forum Header Image in core theme ?
Post by: Deaks on November 29, 2017, 07:21:14 PM
With core its slightly more complicated you need to modify the index.template.php and index.css the section in index.template.php is

<div class="catbg">
<img class="floatright" id="smflogo" src="', $settings['images_url'], '/smflogo.gif" alt="Simple Machines Forum" />
<h1 id="forum_name">';

if (empty($context['header_logo_url_html_safe']))
echo $context['forum_name_html_safe'];
else
echo '
<img src="', $context['header_logo_url_html_safe'], '" alt="', $context['forum_name_html_safe'], '" />';

echo '
</h1>
</div>';


their are also many topics on how to do this if you go back a few pages in the board ;)