MyBB Community Forums

Full Version: How do I center header logo image, change image size?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello;

First, I want to thank the programmers for this wonderful software program.

I am running the 1.6.1 version of the MyBB forum software. I need to do two things:

a). align the logo image to the center; and
b). insert a larger image in the header with my own logo.

I think that I see how to do the above but before I tinker with any of the code I need to get a bit of input.

If I click the following sequence of links:
Admin CP --> Templates --> Default Templates --> Header Templates --> header

I get to a page where it says "Edit Template"
(for clarity purposes only the relevant part of the code is shown below)

<div id="header">
	<div class="logo"> (php and html code here) </div>
	</div>
</div>

I think that all I need to do is add align center to the <div class="logo"> tag:
<div class="logo" style="text-align:center">

My questions are:

1). Is the above the only place where I make a change so that the header logo is centered?

2). Do I need to change the image height and width parameter attributes in the <img> tag for the logo if I use a larger header image? If so, at what places do I change the <img> height and width attributes?

Thanks.


See the global.css

Look for .logo Smile

And it should look similar to this if you want to include height and what not Smile

.logo {
height: 150px;
width: 800px;
}
Scratch, disregard the below post.

Ashley, thanks for responding to my post.

I've already tried looking for .logo in the global.css The global.css is located at:
Home --> Themes --> Default --> global.css

I did a search before making this post. I found one thread where someone had a question similar to mine. Someone suggested changing the .logo style in the global.css file.

I tried to find .logo at the global.css found in the Admin CP. The .logo code snippet is not there. There's nothing in that entire file that says logo.

It's puzzling - I cannot find a global.css file in the MyBB 1.6.1 download package.

What's even more puzzling is there are styles/terms in the global.css file found in the Admin CP that I cannot find in anywhere the MyBB 1.6.1 download package. Those terms are "breadcrumb" and "remember_me."

Edit: Correction, I did find the terms "breadcrumb" and "remember_me" in the folders. Sorry for the mistake. However, I still have not found the global.css file in the download package.

(I have the Ultra Edit program. It has a text search feature that I used for the searches.)

I copied the global.css text from the Admin CP and pasted into a file. I then saved it to a file that I have named "from.admincp.global.css." It's attached to this post.

I have found two files in \admin\styles\default\ in the download package that have styles named logo.

The login.css file:
#logo h1 {
	height: 82px;
	background: transparent url(images/login_logo.gif) bottom left no-repeat;
	margin: 10px;
	padding: 0;
}

and the main.css file:
#logo h1 {
	background: #fff url(images/logo.gif) no-repeat top left;
	height: 82px;
	margin: 0 0 2px 0;
	border-bottom: 2px solid #ccc;
	padding: 3px;
}

Should I change/modify these two styles instead?

Thanks.




I got it part of the way figured out. I inserted this code into global.css

.logo {
	background: #fff url(images/logo.png) no-repeat top center;
}

The logo for my web site is centered just the way I want it.
http://www.iknx.us/forum2/index.php

However, the MyBB logo is still showing. Can somebody tell me how to remove the MyBB logo?

Thanks.