Add a Custom Banner to the Top of The MySpace PageMy code for a custom Top Banner, for BOTH myspace 2.0 and myspace 1.0, has been moved here:
Add a Top Banner to MySpace 2.0 OR Myspace 1.0, standard page, artist page, band pageIF your banner consists of something other then an image you will need to create your own code. I am not able to detect the needed values, to generate the code for you.
First Create a div block, that contains the content of your top bannerThe div can contain any html content that myspace does not filter.
You can put a flash object, links, and more inside this div.
<div class="iTopB">
YOUR CONTENT HERE
</div>
Next we use a style block, to position the Div, and create the needed space for the div.
IF you are using myspace 2.0, omit (leave out) the style tags, and put the style code lines in the css area.
For all others, keep the style blocks.
<style>
{! code author:Eileen; http://xiii.us/ !}
.i {display:none;}
{! create space for top banner !}
body {margin-top:130px;}
{! position div !}
div.iTopB {position:absolute; top:0px; left:50%; margin-left:-400px;}
</style>
IF your div does not position on top, but positions elsewhere on your page, this is likely because you have some style code, that is assigning some parent element (parent to the div) as the positioning reference container.
In IE, have a position statement, on a parent table OR div (and possibly other elements as well), will cause that element to act as the container for position reference.
In non IE a table position statement won't cause the table to act as the positioning container. However, a div position statement will.
In myspace 1.0, and artist pages, there is a solution for this.
We can take our top banner div, and place it OUTSIDE of the bio/blurbs content area, so that any positioning on that table, does not effect the positioning of the top banner.
[This will not work in myspace 2.0, you are not allowed to close off element structures that you did not also open.]
<a class=i href="http://xiii.us/eGen/topB.php">Top Banner MySpace"</a>
</td></tr></table></td></tr></table>
<div class="iTopB">
YOUR CONTENT HERE
</div>
<table class="i"><tr><td><table><tr><td>
==== old article below, much of it is still relevant for myspace 1.0. However, now that I am recommending that everyone upgrade to myspace 2.0, I do not plan to maintain the below code, as myspace makes future changes to 1.0 ============
Most of these solutions work on
- Regular Page
- Band Page
- Film Page
- comedy page
For a Code Generator (which will determine the correct values after you enter the url of your image, and banner location):
Click Here for Top Banner Code GeneratorA banner can be added to multiple locations in the top page area,

For those who are interested in an explanations, so you can create and/or modify the code, read the article below.
This will also give you the needed code to place an object (such as a flash swf file) in the top area.
For those who do not want to read through my Explanations and just want some quick code blocks, you can use the below links to jump to the desired page content:
Using the Top of your Background Image as a Top BannerPlacing Custom Banner OR other content (Div, Object, Marquee) at the very TOP of the page, above Ad Banner Place Banner just under Ad Banner, Keep Google Search FormPlacing image just above the main navigation bar Placing image just above the main table Full Example: placing image Under Main Navigation Bar, and placing multiple links on the image Placing Custom Banner Under the Music Nav Bar Banner Under Top Menus, Where image border alignment with border around main table is ImportantThere are multiple techniques one can use to place a custom banner near the top of the Page.
Placement StrategiesThere are two basic placement strategies.
(There are more, but only two I recommend, for the top space)
1)Absolute Placement:
I recommend this IF you are very close to the top of the page.
OR (you need to make links AND are still reasonably close to the top of the page.)
OR alignment with your background image is MORE IMPORTANT than alignment with your top menu area (default page content).
2)As a Background Image to Something which is already on the page.
Before the most recent round of core code changes, I recommend this if one was going lower than just below the ad banner, and wanted very accurate placement.
using the top of your background image as a top bannerThe below code only creates a margin above the top Ad Banner. It is useful if you want to draw your top banner directly into your background image.You can place this code at the very top of the about or bio section:
<a class="i">START CODE TO MAKE TOP MARGIN ABOVE AD
<a href="xiii.us/ms/ad-search-menu">MySpace Top Banner</a>
<style>
.i {display:none}
body.bodyContent {margin-top:60px !important}
div.clearfix i i.i {margin-top:0px !important }
{! IF you have a Comedy page, you also need the below.
value needs to be 160 plus top margin !}
div.profileWidth table div ul, div.clearfix i i.i {top:220px !important;}
</style>
END CODE TO MAKE TOP MARGIN ABOVE AD </a>
Putting your own image, marquee, or flash or other content at the very TOP of the page This code works on the Standard Page, Band Page, Comedy and Film Page.
This code is designed to place the banner (or div content), logically
OUTSIDE of the table you are placing the code in. I do this, because too often people have utilized a position command on the table. In these cases, the banner was unable to position outside the table, in IE.
This solution also has code to prevent some very common page customizations from rendering the top banner not visible.
This is the reason my solution, has much more code than most solutions.
But it does work in more cases, with more profiles, than the other code I have seen published.
It is
VERY IMPORTANT that this code get placed
AFTER any content, in either the
To Meet or
Bio or
Heroes (only if you are not showing groups) or
Any of the General Sections on the Band PageIF in doubt, as to where you can place this code, place it at the END of the Bio or Meet section; UNLESS you already placed structure altering code (opened or closed a div or table) in this space.
<i class=i>!!! Start Code To Apply Top Banner !!!!</i>
</td></tr></table>
</td></tr></table>
<a class="i" href="http://xiii.us/ms/top-banner" title="myspace top banner">
Custom top banner code by Eileen</a>
<div class="xiiiTopBanner" style="position:absolute; top:0px; left:50%; margin-top:0px; margin-left:-410px; z-index:9 !important">
<img src="http://i10.tinypic.com/639n3br.jpg">
</div>
<style>
.i {display:none;}
{!-Create space for image above body-!}
body.bodyContent, body, i i i.x {margin-top:100px;}
{!-The below value needs to be 160 + the height of your top banner -!
div.profileWidth table div ul, div.clearfix i i.i {top:260px !important;}
</style>
<table class=i><tr><td>
<table><tr><td>
<i class=i>!!! End Code To Apply Top Banner !!!</i>
IF you have a block of code, other than just an image (such as a marquee, sliced image OR flash object, or Other), you can still use the above technique.
Just replace what I have placed inside the div.myBanner (I have only an image inside) with your own code block. Your block may consist of an object, another div, a table structure or other.
Placing image just Below the Ad banner On the standard page, there is a rumor that it is against the terms of service to move the ad banner down. I have not seen this in the terms. The language they use is "obscure". Therefore I would not move it down too far. Use your own judgment.
Because the ad banner is EXACTLY 90px in height, we can measure accurately from the top of the page, to the placement point for our banner.
Therefore I still use absolute placement.
[note: in FF there are an extra 10 pixels above the ad. The extra 10 pixels are caused by a form, that is not used, but is in the code, and takes up space in FF but not IE.
You can eliminate the form.]Place Banner just under Ad Banner, Keep Google Search FormWorks with Standard Page, Band Page, Comedy and Film Page.
The below code keeps the google search form, and places your banner just below the ad banner.
<i class=i>!!! Start Code To Apply Top Banner !!!!</i>
</td></tr></table>
</td></tr></table>
<a class="i" href="http://xiii.us/ms/top-banner" title="myspace top banner">
Custom top banner code by Eileen</a>
<div class="xiiiTopBannerUA" style="position:absolute; top:90px; left:50%; margin-top:0px; margin-bottom:0px; margin-left:-410px;">
<img src="http://i10.tinypic.com/639n3br.jpg">
</div>
<style>
.i {display:none}
{!-make room Under Ad -!}
div.profileWidth div.clearfix div {margin-bottom:105px !important;}
div.profileWidth div.clearfix div div, div.profileWidth div.clearfix div.profile, div.profileWidth div.clearfix i i.i {margin-bottom:0px !important}
{! the below value needs to be 160px + height of your banner !}
div.profileWidth table div ul, div.clearfix i i.i {top:260px !important;}
</style>
<table class=i><tr><td>
<table><tr><td>
<i class=i>!!! End Code To Apply Top Banner !!!</i>
Using Either of the code blocks above, the image can be turned into a link by replacing this line:
<img src="http://i10.tinypic.com/639n3br.jpg">With This:
<a href="http://spiff-myspace.blogspot.com"><img src="http://i10.tinypic.com/639n3br.jpg"></a>Replace both the URL for the link, and the URL for the image, with your own data.
IF you are placing the ad banner, below the Google search, or below any of the top menus, I recommend a different strategy. The below code blocks all use the background image strategy.
(Links can still be added, but as a separate step).
The following page elements can be easily hijacked for use as a custom banner.
Please see my top banner code generator:
Click Here to Use the Top Banner Code ToolI have updated the code in that tool, and removed it from this article.
Turning images into a LinkMy tool places image banners, which go below the google search (or lower) using a background image property.
This means it is more difficult to tun them into a link.
To turn the image into a link, we are going to use a clear gif, and place the gif over the image, and turn the image into a link.
Because the link image will be clear, it is not as critical that its placement is perfectly aligned.
I will use the same clear gif that is already used on the default myspace page.
The distance, in pixels, from the top of the page, to the bottom of the music navigation bar (where we placed the image) is about 215 pixels.
It varies from 209px to 221 (I measured in IE and FF and in multiple resolutions).
I do NOT want to cover the links on the maroon bar, that is more important than slight overlap into the table space below the image.
Based on this, I am going to use 222px. I will also make my clear gif about 20 px less than the height of my image.
Placing the image just above the main navigation bar The following page elements can be easily hijacked for use as a custom banner.
Please see my top banner code generator:
Click Here to Use the Top Banner Code ToolI have updated the code in that tool, and removed the code from this article.
I will update the tool to handle link images very soon.
==== the stuff below this line has not been updated based on the latest code changes. It may or may not still be valid ========================
Get measurements for LinksIf you do not know how to do this, and do not have a tool to do this easily, I have created a grid with a clear background. You can temporarily place this grid on your page, to get measurements.
If you want to use my grid, add this code block (it is temporary, you will remove it later).
<div class="grid1" style="position:absolute; top:0px; left:0px; z-index:0">
<img src="http://i11.tinypic.com/4pczehk.gif" >
</div>
You may need a higher z-index if you have used z-index for your image.
Here is a picture of what my page looks like, after I have placed the image, and placed the grid on top of the image:
As seen in FF at 96 dpiAs seen in IE at 96 dpiAs seen in IE at 120 dpiNotice the differences in how the image sits, with relation to the grid.
Notice that in all three cases, the image sits neatly under the main nav bar, even in the case where the navigation bar wrapped to the next line.
Because we are going to place our clear gifs (which will become our links), with reference to the whole page, and not an inner div, we need to measure from top AND center (not left or right).
We also need to know the height and width of the area we are going to link.
I will measure for 4 links. I have the 4 areas outlined in violet on my image.
In each case I am going to use a large area in the center of the image, but insure that I don't include any area which overlaps my top menu.
I get the following:
| top | center of page to edge of link area | width | height |
| 200 | 330 left to left edge | 550 | 75 |
| 300 | 300 left to left edge | 140 | 70 |
| 300 | 120 left to left edge | 140 | 70 |
| 300 | 200 right to right edge | 140 | 70 |
Hint on getting measurements:
If I place an image, left:50%, it places the left side of the image center.
with the rest of the image off to the right.
If I then add a margin-left, it moves the image to the RIGHT, the amount of that margin (creating a margin on the left side). If I make the margin-left negative, it move to the left.
Now that I have my measurements, I can add in my links.
I am going to put each link in a div. I will give each div 2 classes. On class will be used by all my links which use the clear gif image. The other class will be unique to the specific link.
The below code has all 4 links, each in a div.
Then I have the style block.
I undersized my link images, to account for variance in the 4 platforms I was testing with. (Keep in mind, that this variance would be in our actual image placement, and not our clear gif link images, had we used absolute placement for our main image).
Here is the code:
<span class="off">!-Create my Links using Clear Gif Image-!</span>
<div class="myL myL1" >
<a href="http://xiii.us/ms1">
<img src="http://x.myspace.com/images/clear.gif">
</a></div>
<div class="myL myL2">
<a href="http://xiii.us/ms1">
<img src="http://x.myspace.com/images/clear.gif">
</a></div>
<div class="myL myL3">
<a href="http://xiii.us/ms1">
<img src="http://x.myspace.com/images/clear.gif">
</a></div>
<div class="myL myL4">
<a href="http://xiii.us/ms1">
<img src="http://x.myspace.com/images/clear.gif">
</a></div>
<span class="off">!-Use style to position and size-!</span>
<style>
div.myL {z-index:8}
{!-position and size link 1-!}
div.myL1 {position:absolute; top:200px; left:50%; margin-left:-320px;}
div.myL1 img {width:540px; height:70px}
{!-position and size link 2-!}
div.myL2 {position:absolute; top:300px; left:50%; margin-left:-300px;}
div.myL2 img {width:140px; height:50px}
{!-position and size link 2-!}
div.myL3 {position:absolute; top:300px; left:50%; margin-left:-120px;}
div.myL3 img {width:140px; height:50px}
{!-position and size link 2-!}
div.myL4 {position:absolute; top:300px; right:50%; margin-right:-200px;}
div.myL4 img {width:140px; height:50px}
</style>
Images of Results:
The grid and purple dashes around the clear gif images are TEMPORARY.
They would be removed from the final page.
in IE 96dpiin FF 120dpiMy other tests came out somewhere in the same range, I just wanted to show a few differences. Note that I sized my clear gif images so that they were within acceptable bounds, and did not overlap the nav bar above or below my custom image.
Also keep in mind, that whatever inaccuracies we have to tolerate, for the placement of our clear gif, we would have to tolerate for our visible image, if we used strategy 1.
Another interesting thing to note, from the above pictures, is the difference in how the main navigation bar behaves, when it does not all fit within the 800px of width; versus how the maroon music nav bar behaves.
If you want to prevent the main navigation bar from wrapping, it is possible (within limits.
I explain it in this article:
MySpace Top Menu StylingTo remove the blue (red on mouseover) from the link images, add this code:
<style>
{! remove border from link images !}
a img {border:none !important}
</style>
Banner Under Top Menus, Where alignment with border around main table is ImportantIn this example I use the main table as the container for the background image.
This method is preferred if you want the banner image within a border which is shared with the main content (and not with the ad/menu area).
If you do NOT have a band page, it works well to put the background image and border two tables deep instead of one. (On the Band Page, the freindsComments are themselves two tables deep, and outside of the main two deep table).
This can be done without effecting the bottom link area.
It does require that you remove the clear gif spacer to the left, or things will look out of balance. However, for a non BAND page, which wants a top banner, under the top menu area, and in perfect alignment with the main page content, this is probably the best solution
======[add code here for two table deep solution]=======
Thank you for Visiting; Have a Nice Day :-)
Queries hitting other pages of mine, which should be hitting this page:
- myspace header ad banner codes.
- how to put a banner under the advertisements on your myspace
- how to put a picture above band profile
- how to put a photo at top of band page code
- how to add myspace headers like bands have
- how to push down your myspace to add a top banner
- Are we allowed to add a custom banner to the top of the page and push down the ad? I don't know. I have not seen in the rules were it says that we can not.
- How to create space above ad advertisement for custom logo
- mySpace top banner code is easy to apply.
-add cusom size banner top myspace bands layouts
- get custom banner under myspace links
Labels: myspace banner