Recent Topics

1 Jan 21, 2008 18:44    

My b2evolution Version: Not Entered

Hey Guys,

I have an image that I would like to put in the header of each blog. I've uploaded the image to my media folder but can't seem to figure out where to put it from there. I've looked into altering the header and basically think I am looking at having to play around with html, errrr ... any help would be great - just can't seem to find the steps to do in the forums or manual.

*Carrie*

2 Jan 22, 2008 04:58

It would be both html and css. The html would go in your _main.php file and the css would go in your stylesheet.css file. Oh and the image would go in your skins/helsinki/img folder that you create.

In main try this:

<div class="pageHeader">

<div class="headerimage">
</div>

<?php 
/* -------------------------- BLOG LIST INCLUDED HERE --------------------------


Then in stylesheet try this:

margin-bottom: 5px;
}
.headerimage {
background: #FFFFFF url(img/filename.jpg) center no-repeat;
height : 200px;
width : 758px;
border : 5px solid #888;
}
h1#pageTitle {
font-family: Arial, Helvetica, sans-serif;

I left a few lines in above and below each extra bit to give you guidance of where I am thinking about.

UNTESTED but it's probably a workable start. BTW you might dig on http://www.w3.org/TR/REC-CSS2/propidx.html for all the groovy rules about how you can do stuff with styles if you're not hip to it already.

3 Jan 22, 2008 06:39

I just found a much easier way to do this:

<body>
<center><a href="http://yourdomain.com"><img src="http://yourdomain.com/media/image_name.jpg" /></a></center>
<div class="pageHeader">

4 Jan 22, 2008 07:18

Thanks EdB! You're the man ...

5 Jan 22, 2008 07:33

Do I put it here?


?>

<div class="pageHeader">

<h1 id="pageTitle"><a href="<?php $Blog->disp( 'url', 'raw' ) ?>"><?php $Blog->disp( 'name', 'htmlbody' ) ?></a></h1>

<div class="pageSubtitle"><?php $Blog->disp( 'tagline', 'htmlbody' ) ?></div>

</div>

<div class="bPosts">

Yes or no, either way, where do I put it, haha...

6 Jan 22, 2008 07:43

Well I guess it depends on which skin you're using yah? Looks like you went with helsinki so I looked at code that works well with helsinki. Assuming this to be the case, then go with the second solution and stick the "center image center" bit between "body" and "div class pageHeader".

After beating a fly with a sledge hammer (first idea) I saw a blog that uses helsinki and had an image in the header that worked really well, so I snagged their code and pasted it here as the second method ;)

7 Jan 22, 2008 10:47

*cough* deprecated tags :|

<div style="text-align:center"><a href="http://yourdomain.com"><img src="http://yourdomain.com/media/image_name.jpg" alt="my header image" /></a></div>

¥

8 Jan 22, 2008 10:48

That's what I thought but the b2evolution blog with an image using center passed validation ... er ... it had 101 errors but not for that particular tag. So I figured what do I know?


Form is loading...