The Arcive of vBulletin Modifications Site. |
|
|
How To Expand Custom Image Header
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:
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: Code:
<!-- logo --> <a name="top"></a> <center> <table border="0" width="100%" 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.jpg" alt="" /></td> </tr> </table> </center> <!-- /logo --> <!-- content table --> $spacer_open $_phpinclude_output |
|
#2
|
||||
|
||||
|
Helpful tut ... many people will find this useful :up:
Great job! |
|
#3
|
||||
|
||||
|
Very nice tutorial, GJ
|
|
#4
|
|||
|
|||
|
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
Code:
<div style="width:100%; background-image:url($stylevar[imgdir_misc]/headbg.gif); background-repeat:repeat-x;"> <div style="float:left;"><img src="$stylevar[imgdir_misc]/head_left.jpg" border="0" alt=""/></div> <div style="float:left; position:absolute; right:0px;"><img src="$stylevar[imgdir_misc]/head_right.jpg" alt="" /></div> </div> |
|
#5
|
|||
|
|||
|
Thank you z - I've been using this tut of yours for some time - very helpful!
|
|
#6
|
|||
|
|||
|
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: PHP Code:
. I replaced it with $stylevar[outertablewidth] for it to be dependent on the outer table width size on StyleVars
|
|
#7
|
||||
|
||||
|
Quote:
Cheers |
|
#8
|
|||
|
|||
|
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! )
|
|
#9
|
||||
|
||||
|
Quote:
Code:
<!-- logo --> <a name="top"></a> <center> <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center"> <tr> <td align="right" 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="center" valign="top" style="background-image:url($stylevar[imgdir_misc]/headbg.gif)"> <td align="left" valign="top"><img src="$stylevar[imgdir_misc]/head_right.gif" alt="" /></td> </tr> </table> </center> <!-- /logo --> <!-- content table --> $spacer_open $_phpinclude_output |
|
#10
|
|||
|
|||
|
very nice..
|
![]() |
|
|