Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
How To Expand Custom Image Header
miner
Join Date: Mar 2005
Posts: 594

by miner miner is offline 24 Jan 2007

We hear it many times...
"How can I make my header image expandable to screen width?"

This tutorial will help you accomplish this task.

Requirements:
  • A bit of html knowledge;
  • photo editor;
  • and, photo editing.
Let's Get Started!

Let's start with a 780px header image ... you can use the example image below...




Then Crop the leftside (your logo part):





And save it as head_left.gif







Second crop the right side of the header image as shown below:



And save as head_right.gif





Next select background image -just 1 or 2px width like shown below:



Crop the selected part and save it as headbg.gif:




Now load all the three images to the misc folder of images...

Next goto admincp> styles&templates> style manager> all style options>

scroll down to header




Delete the existing code complete and insert the follow there:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Updated the code above and just change the gif/jpg name you are using...

Last edited by Princeton; 26 Jan 2007 at 16:12..
Views: 48116
Reply With Quote
Comments
  #2  
Old 26 Jan 2007, 16:20
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Real name: Joe Velez
Helpful tut ... many people will find this useful

Great job!
__________________
Former vBulletin.org Staff Member

Latest Articles:
Liquid Layout = Less Ad Revenue?
How to Monetize Your Site
Improve Web Page Performance
How To Write For The Web


If it needs instructions, there's room for improvement.
Give users what they actually want, not what they say they want. And whatever you do, don't give them new features just because your competitors have them!
Reply With Quote
  #3  
Old 23 May 2007, 01:11
AzzidReign's Avatar
AzzidReign AzzidReign is offline
 
Join Date: Apr 2006
Very nice tutorial, GJ
__________________
Xbox 360 Mods
Reply With Quote
  #4  
Old 25 May 2007, 16:40
Charged Charged is offline
 
Join Date: Jun 2005
I just did this on my site, though I've used css rather than a table for those who would rather here is how I did it. Save images the same as explained above then in the header put


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #5  
Old 10 Jun 2007, 16:19
Ohiosweetheart Ohiosweetheart is offline
 
Join Date: Dec 2005
Real name: Peggy
Thank you z - I've been using this tut of yours for some time - very helpful!
Reply With Quote
  #6  
Old 14 Oct 2007, 10:28
edgecutioner edgecutioner is offline
 
Join Date: Jul 2007
Location: Qatar
Real name: ???
thanks for the tip man. this will add up to my skin designing skills

[edit]After trials and errors for 1/2 hour, I found something that will not work if you want your skin to be fluid. see the code below:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The original value in the highlighted is "100%" which will go to fit your skin which is wrong . I replaced it with $stylevar[outertablewidth] for it to be dependent on the outer table width size on StyleVars

Last edited by edgecutioner; 14 Oct 2007 at 10:48.
Reply With Quote
  #7  
Old 20 Oct 2007, 12:55
SLY LS1's Avatar
SLY LS1 SLY LS1 is offline
 
Join Date: May 2007
Real name: Wayne
Originally Posted by edgecutioner View Post
thanks for the tip man. this will add up to my skin designing skills

[edit]After trials and errors for 1/2 hour, I found something that will not work if you want your skin to be fluid. see the code below:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The original value in the highlighted is "100%" which will go to fit your skin which is wrong . I replaced it with $stylevar[outertablewidth] for it to be dependent on the outer table width size on StyleVars
Worked perfect

Cheers
Reply With Quote
  #8  
Old 23 Dec 2007, 18:46
KWonline KWonline is offline
 
Join Date: Aug 2006
I am trying to add a header which has curved edges to my forum using this technique. However, my middle background bit is repeating under the invisable pixels of left and right header images. I'm stumped as to how to stop that happening?

(great tut by the way! )
Reply With Quote
  #9  
Old 31 Dec 2007, 05:22
Webmist's Avatar
Webmist Webmist is offline
 
Join Date: Jan 2006
Real name: JJ
Originally Posted by KWonline View Post
I am trying to add a header which has curved edges to my forum using this technique. However, my middle background bit is repeating under the invisable pixels of left and right header images. I'm stumped as to how to stop that happening?

(great tut by the way! )
An alternate way is to add a center table cell to expand with as follows:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Of course to adjust the header you may have to specify the width of the left and right table cell. Remember this is a complete table in the header template.
Reply With Quote
  #10  
Old 28 Jan 2008, 17:51
ndut ndut is offline
 
Join Date: Sep 2007
very nice..
Reply With Quote
  #11  
Old 20 Feb 2008, 23:35
Powerofdreams Powerofdreams is offline
 
Join Date: Jan 2008
Real name: Hüseyin
good article thanks
Reply With Quote
  #12  
Old 27 Feb 2008, 05:07
badseed00 badseed00 is offline
 
Join Date: Jan 2008
Ok, so I tried to follow the basic guidlines of the tutorial and implement them into my complex table. however, I seem to be running into some issues;

1. When I set the expaniding sections to 100%, they take up the entire header adn my main image is gone
2. If I change the % width to somethign like 20%, they expand and contract as they should BUT, when the screen res lessens the two expandable areas only shrink down a little bit and then the main image acts like it has two columns and they begin to shrink.

What did I do wrong?
Here is the code I used;


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #13  
Old 27 Feb 2008, 18:10
rooban12's Avatar
rooban12 rooban12 is offline
 
Join Date: May 2007
its not working for me
Reply With Quote
  #14  
Old 10 Mar 2008, 10:34
cypher1973's Avatar
cypher1973 cypher1973 is offline
 
Join Date: May 2007
hey guys ive done this and used this code in my header
<table class="tborder" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td align="top">
<!-- logo -->
<a name="top"></a>
<center>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center" style="background-image:url($stylevar[imgdir_misc]/headbg.gif)">
<tr>

<td align="left" valign="top"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/head_left.gif" border="0" alt=""/></a></td>
<td align="right" valign="bottom"><img src="$stylevar[imgdir_misc]/head_right.gif" alt="" /></td>
</tr>
</table>
</center>

<!-- /logo -->
<!-- content table -->
$spacer_open

$_phpinclude_output
<!-- Right Column Code -->
<<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td valign="top">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top">
<!-- End Left Column Code -->

but as you can see i get a little white line ;( http://www.fusion64man.co.uk/index.php?pageid=home

Ive tried to get rid of this but o luck can anyone help.


Thanks andy
Reply With Quote
  #15  
Old 11 Mar 2008, 04:16
carrlos's Avatar
carrlos carrlos is offline
 
Join Date: Nov 2006
Below is my header code. I have a Windows Live Mail sign up banner at the top of my forum under the header image. I want to change the forum from a 900px set width to 100% but I don't know how to recode the Windows Live banner. I already change the Main Table Width in StylesVar to 100%. I put the code that needs fixing in red.

Thanks in advance!
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by carrlos; 11 Mar 2008 at 04:23.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 10:24.

Layout Options | Width: Wide Color: