I do not have time to troubleshoot people's code. (Hopefully I will again in the future).
I do not have much time to answer questions (but if it is a quick answer, that only takes me a few minutes, I will try to answer).
I really recommend the following site, for myspace customizing questions: Official Myspace Customizing Forum
That is the most reliable source, and the people I know who enjoy helping, and are quite good at it, tend to hang out there.

Monday, April 16, 2007

myspace band page div layout

THIS ARTICLE IS NOT FINISHED, however Steps 0, 1, and 2 are ready for use

This guy has a complete tutorial, and has put a lot of effort into coming up with solutions, related the many changes myspace has made since I wrote my articles.

I have not had a lot of time to study all the changes, so I am going to refer people here:
www.myspaedivs.110mb.com Erick's myspace div Tutorial
OR, if that one doesn't load, use this one:
myspacedivs.net84.net


I am sure I will not finish this article this year :-).

MySpace Div Overlay/Layout for a Band/Artist Page


This is a tutorial for a strategy. It does have some cut/paste code, but it does require that you read the instructions.

USE SAFE MODE this is very important


STEP 0: (OPTIONAL) Apply a Top Banner
I am reserving the Band Members section to place code for a top Banner.
To apply a top banner go here:
Apply Top Banner
Place the code, the above link generates, in the Band Members section.

STEP 1: Hide Everything except the Top ad/menu area; bottom links; music player

You can recover the desired page elements at a later step in the process.

This hide strategy removes clear gifs, padding, and other invisible content which takes up space on the main page.

This hide strategy can be used with this Div Overlay strategy, or with other Div Overlay code.

Place this code in the Bio Area.
<i class=i>!START code in Bio !</i>
<i class=i>!START Style Block For Hiding Elements on Band Page!
<a href="views-under-construction.blogspot.com/2007/04/myspace-band-page-div-layout.html">
MySpace Band Page Div Overlay/Layout Hide Everything</a>
<a href="xiii.us/eGen/mpSkin.php">
MySpace music Player Skins standard and Band</a>
Code Author: Eileen
PLEASE keep the above credits they will NOT show up on your visible page
</i>
<style>
{! fix a centering problem, and clear white space caused by clear gifs !}
div.clearfix i i, .i, table td img {display:none}
td {width:auto;}

{! restore any images displayed inside our div. You may want to use block instead of inline for some images. !}
table td div.myCoreDiv img, table td div.myCoreDiv table td img,
table td div.myCoreDiv div img {display:inline;}

{!OPTIONAL restore image on maroon nav bar!}
a.navbar img {display:block;}

{! removes most content and the space it occupied !}
table table table {display:none}

{! minimize the remaining main page content that can not be removed without effecting the ad and menus !}
table table td { height:0px; margin:0px; padding:0px;}

{! restore custom div. !}
table div.myCoreDiv {display:block;}
{! restore any div inside core div !}
table div.myCoreDiv div {display:block;}

table table br {display:none;}
table table table br {display:block;}

{! OPTIONAL decrease space between bottom and bottom menu, and between bottom menu and cc thing !}
{! does not work in Safari !}
table div br {line-height:4px;}
{! reverse effect on custom div !}
table div.myCoreDiv br {line-height:11px;}

{! OPTIONAL remove default background coloring !}
table table, tr, td {background-color:transparent !important}

{! OPTIONAL remove the blue behind the ad banner !}
div.profileWidth table, div.profileWidth td, .i {background-color:transparent !important}

{! OPTIONAL remove the maroon background and black underline from music nav bar !}
div table {background-color:transparent !important}
div table {border-bottom:none !important;}

{! End Style to Hide band page Elements !}

</style>
<i class=i>!End code in Bio !</i>

STEP 2: Insert Structure for Div Core
Even if you are using a div overlay from another page, this step can be used.
This step creates our structure, where we will insert our div content.
Div content can vary.
In my first example I will use what I call a Core Image
Later I will provide examples using floating Divs and Divs created using other commonly used Div content tools designed for use with MySpace.

Place the below code block in the Influences.
It is very important that this code be placed in one of the left side sections and NOT in the bio.
<i class=i>!--START CODE IN Influences --!</i>
<i class=i>
!-Start Div Overlay Content Block-!
<a href="spiff-myspace.blogspot.com">
myspace code tutorials by Eileen</a>
!-Close 3 layers of cell/row/table. This puts our Div ONE table deep.
</i>
</td></tr></table>
</td></tr></table>
</td></tr></table>

<i class=i>!-Create and size our div. We will never close this div. It will close when the containing table closes-! </i>

<i class=i>!!! MODIFY width to the SAME width as your core (core image or core content) !!!</i>
<i class=i>!!! IF you know the exact height of your content you can change
height:auto to a specific px height. If you are not Sure, then leave it set to
auto !!!</i>

<div class="myCoreDiv" style="position:relative; top:0px; width:900px; height:auto !important; border:2px magenta dashed;">

<i class=i> when DONE editing CHANGE the border:2px to border:0px or change the magenta to the color you want your border.----!</i>

<i class=i> !----START CUSTOM CONTENT----! </i>





<i class=i> !----END CUSTOM CONTENT ----!</i>

<i class=i>!-Open 3 layers of table/row/cell-!</i>
<i class=i>!-IF do NOT want any content from my Right side, I can use i instead of L1. However the music player is logically in this space-!</i>
<table class="L1" ><tr><td>
<i class=i>!-The below class i hides the remainder of the general table-!</i>
<table class="i"><tr><td>
<table class="i"><tr><td>
<style>.i {display:none}</style>
<i class=i>END CODE IN Influences</i>

STEP 3: INSERT Core Image
IF you are not using a Core Image, you can instead insert another Div here, or even a complete Div overlay, a Sliced Image or Other content.
This Tutorial uses a Core Image strategy.


When you draw your core image, draw in blank areas, to use for any content you want to import into the overlay.

The image I am going to use in this Tutorial can be found here:
Core Image stored on TinyPic

My image is Height:813px Width:913px.

I put the following code line just after the line that says this:
!----START CUSTOM CONTENT----!
<img class="coreImg" src="http://i11.tinypic.com/7xsglg7.gif">

If you have multiple images, do NOT leave a carriage return between them.
You can place a carriage return after you open the image tag, before you put in the src clause. However, between the close of one image tag, and the open of the next, do NOT use a space or carriage return.
example:
<img
src="URL-OF-IMAGE"><img
src="URL-OF-Next-IMAGE">


I recommend using a Single image UNLESS your image is larger than your image host accommodates.

Because our core div is set to width:auto and height:auto, it automatically sizes to accomodate the content we place inside it. Do NOT set width to zero. Set it to either auto OR the width of your core image.
Because of where I placed the code to start the core div, it should automatically center itself. [note: MySpace may make changes to their own code which changes this, but for now, this strategy does automatically center the core div]

I started to write a tool to make it much easier to create the needed links, on top of the core image or core div. I hope to finish it this weekend. It depends on the demands of my real job (the one that pays the bills).

Labels:

Sunday, April 15, 2007

mySpace Simple Band Div Overlay div overlays

Building a very simple Band Div Overlay.

This Article is Obsolete.
Please go here:MySpace Artist Band/Music Page Div Overlay


I am keeping this older article in Tact for Historical reasons (and the fact many parts of it have been posted on createblog, and possibly other sites without my permission).

==== old article below ============



This div overlay strategy does NOT hide the bottom links as most of them do.
WARNING it may be against myspace terms to Hide the Bottom Links. At least one profile has been deleted for this Reason. For this reason I have removed the code, for that option, from this tutorial.

This tutorial is for the Band Page. If you are building an overlay for the Regular page go here:
Standard Simple Div Overlay MySpace


The below strategy does the following:
- Starts with a Picture, where as much content as reasonable is drawn directly into the picture. You can draw in your links, logo, and anything else you want.
You can draw in boxes or leave blank areas to import content from the default page.

- Hides the default page content completely (except the Ad Banner, search/menu areas, bottom links)
You may opt to add additional code to remove the top menus.
If you use this strategy correctly, your div should adjust to accomodate any changes to the top menu area.

(This block can be used, to hide the whole myspace page, without using the rest of this tutorial.)

- Inserts your page image or div
- Shows you how to turn parts of the image into links
- Shows you how to import content from the default myspace page into your div overlay.
- Shows you how to add a custom scroll section to use for whatever.
- Shows you how to create a custom "add comment" box.

This example uses the band page. This concept works for the Regular Page or The Band Page. The exact code I use, is sometimes Band Page specific.

To see the page we will be building, in this tutorial Click Here
(The grid and borders are temporary, and removable).

As you follow this tutorial, You will create your own layout. (But if you like my template, you are welcome to use it.)

Notes:
1) USE SAFE MODE, it really does simplify things. This option is next to the regular "edit page" option.
2) Do NOT count on Preview, it will NOT show you what your page will look like, when using custom style commands. You must submit and view your page to see the results.
3) IF your submit button does NOT show you can still submit. Paste this code into the address bar of your browser:
javascript:document.forms[1].submit()
Then hit return
The above works for both the Preview Button and the Submit Button.
(I tested this tutorial using safe mode, and it did NOT hide my preview or submit button).

Step 1: Create the Core of your overlay as a Single Image
Use a picture editing program (photoshop, paint, paintshop etc ...) to Create a picture of what you want your layout to look like.

Leave space where you want to do any of the following:

- pull in content from the default page.

- create content (Such as Text) in a separate div to place on your page

i.e. You will make a Picture to use as the core of your layout, leaving space on the picture anywhere you want to add content which is not actually part of your picture.

This core picture will become our building block. We can turn parts of this picture into links, and import default page content (or other content) into other parts of the page.

The following is a picture I created using paintshop. This will become the building base (core) for the div overlay I will create in this tutorial.
Click here to see the Image I will be using to build this Page with

Step 2: Remove the default Content from the Main part of the page (This is everything between the top menu area and the bottom links).
-The top and bottom menus, and the search thing, can be removed here, or later if desired. Our div will position automatically if they are removed later.
-We will position the music player at a later step. For now it will just sit below your core.
-We will be able to recover other desired content later. For now remove even the content you want to pull back in. The Code below, to Hide the Content, is designed so that it is easy to import most of the default content back into your div overlay.

Place this code block in your "sounds like" Section. (It can go anywhere that takes style blocks, I use the sounds like section).
<i class=i>!START code in Influences !</i>
<i class=i>!START Style Block For Hiding Elements on Band Page!
<a href="http://xiii.us/ms/band-hide-all">MySpace Band Hide Everything</a>
</i>
<style>
.i, div.clearfix i i i {display:none}
{! fix a centering problem, and clear white space caused by clear gifs !}
td {width:auto;}
table td img {display:none;}

{! restore any images displayed inside our div. You may want to use block instead of inline for some images. !}
table td div.myCoreDiv img, table td div.myCoreDiv table td img,
table td div.myCoreDiv div img {display:inline;}

{!OPTIONAL restore image on maroon nav bar, we could use a.navbar img!}
div table td a.navbar img {display:block;}

{! removes most content and the space it occupied !}
table table table {display:none}

{! minimize the remaining main page content that can not be removed without effecting the ad and menus !}
table table td { height:0px; margin:0px; padding:0px;}

{! restore my div. !}
table div.myCoreDiv {display:block;}
{! restore div with Comments !}
table div.myCoreDiv div.myDclassFC {display:block;}
table div.myCoreDiv div {display:block;}

table table br {display:none;}
table table table br {display:block;}

{! OPTIONAL decrease space between bottom and bottom menu, and between bottom menu and cc thing !}
{! does not work in Safari !}
table div br {line-height:4px;}
{! reverse effect on custom div !}
table div.myCoreDiv br {line-height:11px;}

{! remove default background coloring !}
table table, tr, td {background-color:transparent !important}

{! ONLY if you want to remove the blue behind the ad banner AND the maroon !}
div.profileWidth table, div.profileWidth td {background-color:transparent !important}
div table {border-bottom:none !important;}

{! ADDITIONAL STYLE BLOCKS CAN GO HERE !}



</style>
<i class=i>!End code in Influences !</i>


Remove as much of the top menu area as desired
To do this see the following article:
MySpace Band Page Top Ad/Search/Menu Area
The First block of code, on that page, will remove ALL of the top area content except the ad banner. You can paste that block of code just under the above block.

Step 3: Close out open tables, Place Div, Re-open tables
We place our Div at a level which is NOT 3 tables deep. The higher we can go in our structure (nested under as few tables as reasonable) the easier it is to avoid conflicts with the default page elements, and our code to remove them. I tested different levels, and found that if I kept the one main table open, and closed the others, it was the easiest to center my div, and have it place neatly between the top area and bottom links.
We will close 2 layers of tables, Place our Div, and then re-open the same number of tables we closed.

I put this code in the Band Members area:
<i class=i>!--START CODE IN BAND MEMBERS --!</i>
<i class=i>
!-Start Div Overlay Content Block-!
<a href="http://views-under-construction.blogspot.com/">
myspace code tutorials by Eileen</a>
!-Close 3 layers of cell/row/table. This puts our Div ONE table deep.
</i>
</td></tr></table>
</td></tr></table>
</td></tr></table>

<i class=i>!-Create and size our div. We will never close this div. It will close when the containing table closes-! </i>

<i class=i>!!! MODIFY width to the SAME width as your core image !!!</i>

<div class="myCoreDiv" style="position:relative; top:0px; width:900px; height:auto; border:2px magenta solid;">

<i class=i> when DONE editing CHANGE the border:2px to border:0px or change the magenta to the color you want your border.----!</i>

<i class=i> !----START CUSTOM CONTENT BLOCK 1----!</i>





<i class=i> !----END CUSTOM CONTENT BLOCK 1----!</i>

<i class=i>!-Open 3 layers of table/row/cell-!</i>
<i class=i>!-IF do NOT want any content from my Right side, I can use i instead of L1-!</i>
<table class="L1" ><tr><td>
<i class=i>!-The below class i hides the remainder of the general table-!</i>
<table class="i"><tr><td>
<table class="i"><tr><td>
<style>.i {display:none}</style>
<i class=i>END CODE IN BAND MEMBERS</i>

You will be adding your content blocks near the bottom (each one below the previous one, but above the "END CUSTOM CONTENT").
Style blocks, will go in the influences area.

Insert Core Image(s)
Just below where it says "<span class="off">!---START CUSTOM CONTENT -----------!</span>"
Insert your image, i.e.
<img src="URL OF YOUR IMAGE"> 
If you have multiple images, list them one after the other. (Assuming they are clean horizontal image slices).
Do not place a carriage return between the image tags, or you will have a gap between them in IE (not in FireFox).
You may place a carriage return inside the image tag.

Insure that the width of your image is the same as the width defined for the div. I have it set to 800px, so if that is not the width of your image, you will need to change the width value. (It should be in bold above)

Step 4: Get the needed measurements for the placement of links and content on to your page
Use a tool which allows you to determine the location of the elements on your page.
There are several tools available for this.
If you have FF, and have installed the extension which gives you a grid line, use that.

I have created a gif, which has grid lines on it, that you can place over the top of your picture to get measurements.
It is here:http://i11.tinypic.com/4pczehk.gif.
It has a hotpink line every 10 pixels, with a black line every 50 pixels.

To make it easier to get the needed measurements, you can put this grid on top of your image, and leave it there while you build your page, and then remove it when we are done.

To place the grid, so that it lays nicely over your image, place the below code block Just AFTER the link to your core image.
<img class="grid" src="http://i11.tinypic.com/4pczehk.gif" style="position:absolute; top:0px; left:0px;">
The Grid is Temporary, we will remove it, or hide it, when we are finished.

Now we are ready to start getting the needed measurements for our content.

For areas I want to make into links, I need to measure both the top left corner along with the height and width.
(We can no longer do image maps on the music page, as the pound sign is now removed even when not in safe mode.)
I must now resort to placing a clear gif over the top of each images, and making the clear gif the link.

For areas I want to import content into (from the default page) I need to know the coordinates of the top left corner and the height and width.

On my grid, there is a pink line every 10 pixels, with a black line every 50 pixels.

Here are the coordinates and measurements from my sample picture:
X,Y of top Left width, height
Add button290,100100,40
Block button 290,180100,40
Message Button290,260 100,40
View Friends410,590130,90
View Comments580,590 130,90
Add Comment 740,590130,90
Areas I want to Pull Content Into
Music Player 420, 200
Shows 420, 20
Comments 20, 410

Now I am ready to put in my clear Gifs, to Create my Links

I will use the same clear gif that myspace uses in their code.
Place a clear gif in the location of each link, using the image as the link.
For this we use the coordinates we measured, for the locations on our page which will become links.
For each place we want a link:
- Create a link (using the a tag), and make the clear gif image the link content. We do this in the content section.
- Use style to size and position the link. In this example I put these style clauses inside the <a> tag. I could have done the style work in a separate style block.
The absolute position will be relative to the top left corner of our core image NOT of the page. (This is far more accurate).


[note: Initially there will be a blue border (red when the mouse is over it) around each of these links. We will leave that there for now, so we can see exactly where the links are. We will remove them when we are finished.]


I came up with the following:

<a href="http://collect.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendID=211130975"
style="position:absolute; top:100px; left:290px;">
<img src="http://x.myspace.com/images/clear.gif" style="width:90px; height:40px;"></a>

<a href="http://collect.myspace.com/index.cfm?fuseaction=block.blockUser&userID=21130975"
style="position:absolute; top:180px; left:290px;">
<img src="http://x.myspace.com/images/clear.gif" style="width:90px; height:40px;"></a>

<a href="http://collect.myspace.com/index.cfm?fuseaction=mail.message&friendID=211130975"
style="position:absolute; top:262px; left:290px;">
<img src="http://x.myspace.com/images/clear.gif" style="width:90px; height:40px;"></a>

<a href="http://collect.myspace.com/index.cfm?fuseaction=user.viewfriends&friendID=211130975"
style="position:absolute; top:590px; left:414px;">
<img src="http://x.myspace.com/images/clear.gif" style="width:135px; height:90px;"></a>

<a href="http://comment.myspace.com/index.cfm?fuseaction=user.viewComments&friendID=211130975"
style="position:absolute; top:590px; left:580px;">
<img src="http://x.myspace.com/images/clear.gif" style="width:135px; height:90px;"></a>

<a href="http://comment.myspace.com/index.cfm?fuseaction=user.viewProfile_commentForm&friendID=211130975"
style="position:absolute; top:590px; left:740px;">
<img src="http://x.myspace.com/images/clear.gif" style="width:135px; height:90px; "></a>

The above lines go into the same section you put the code for your core image. You put this block just after the other code you have placed in the "YOUR CONTENT GOES HERE" space.

IMPORTING Content From The Default Page (the stuff we hid or moved out of the way)

For this task I will put my style blocks at the end of my "Sounds Like" section, just below where I have my "Hide Everything" style block.
Each block I provide is a complete style block (including open and close tags, and often an outer span section which I use as a comment.)

The music player can be addressed like this:
table table td.text div object
OR
table div table td.text div object (where the first div is our custom div.)

in non IE you will need to UNDO any positioning done on the object, on the nested object just below it.
non IE has two objects.

table table td.text div object object



Because the player is inside my div, I can place it relative to the top corner of my div.
Because this is the only object on my page, I can address it like this:
object {position:absolute; top:200px; left:420px;}

IF you have (or plan to have) other objects, on your page, use the more explicit address. This should be explicit enough:
table table td.text div object {position:absolute; top:200px; left:420px;}
table table td.text div object object {position:static;}


(Because I opened the exact same number of tables and cells that I closed, I can address elements, of the default myspace content, using the same depth as I would normally use.)

IF your overlay, has other objects, you may want to put each additional object into its own DIV with its own class name.
If you do not, you will not be able to position each one in a different location.
We can NOT assign a class to the default music player. We do not have any place we can insert code, which will have that effect.

I ended up inserting the following block at the bottom of the "Sounds Like" section.
<style>
{!-music player-!}
table table td.text div object {position:absolute !important; top:196px !important; left:420px}
table table td.text div object object {position:static !important;}
</style>

If you want to resize your player see this:
Band Page Music Player, Sizing, Moving, Styling
(The above gives some re-size values which have the correct aspect ratio)

Importing the Show Section
Next I will import the shows.
It is important that our shows not take up more space then what I have allowed on my overlay.

In the default layout the shows are at this level
table table td.text div table (They are inside a div in the default layout)
They are 3 tables deep so we have rendered them display none.
We can now address this like this:
table div.myCoreDiv table div table

I used the following code block:
<style>
{!- shows -!}
table table td.text div {position:absolute; width:440px; height:130px; overflow:scroll; overflow-x:hidden; top:30px; left:415px;}
{!- UnDo effect on Div in Friend and Comment spaces -!}
table table td.text table div {position:static; height:auto; overflow:hidden}
table table td.text div.commentlinks {display:none;}
table table td.text div table {display:block}
{!-fix column width of shows-!}
{!-set below px width to the width of your shows space-!}
table table td.text div table td, table table td.text div table {width:425px;}
table table td.text div table table {width:100% !important}
{!-adjust below value as needed-!}
table table td.text div table table table {width:40% !important}
</style>

IE sometimes has trouble with percent sizing. You may want to change the 40% to a px size (i.e. width:120px}

I put the shows into a box I had drawn on my core image.
If I wanted it to look good, even if my show list was shorter, I could choose to instead put a border around the div which contains the shows, and NOT use a box drawn on my div. For more on styling the shows:
Band Page Shows, Structure and Styling

Importing and Displaying the Comments
The Easiest way to import the comments, is to just unhide them and let them sit at the end. This block will display the comments in their default location (the bottom of the page).

Although the main table for the comments is only 2 tables deep, it has inner tables which are 3 table deep.
IF you have my old hide code you may need to remove the following line:
{!-Comments-!}
table table.friendsComments, table table.friendsComments td.text table {display:none}


For the sake of organization, I put all the code related to my friends and Comments in the Bio Section. (If I want to put them in a scroll box I have to use the bio section for that, so I decided to put the style stuff there as well).
The below block of code had a bug, which has now been fixed. If you used this block prior to Oct, your comments will fall outside of the div (in FF only). Please replace with the new block below.

Add this block to the Bio Section (which should be empty):
<span class="off">!-Display Comments-!</span><style>
table table.friendsComments td.text table,
table table.friendsComments {display:block}
</style>
<span class="off">!-END Display Comments-!</span>
All the above block does is display the comments in the location they fall naturally (the bottom center). They are logically within our outer div, so they will push the bottom links down.
IF you gave your outer div, a set height (instead of using height:auto) and it is not long enough to accomodate the comments, your comments will not display correctly. FF and IE will treat this situation differently.
So insure your div is either set to height:auto, or has enough height to accomodate the comments.

(I will cover putting the Comments and/or Friends into a scroll box later)

Display Friends on Your Div Overlay
Place this code block, in your Bio Section, just under the last block we placed there:
<span class="off">!-Display Friends-!</span>
<style>
{! display friends !}
table table td.text table.friendSpace,
table table td.text table.friendSpace td.text table {display:block}
{! restore width in FireFox and Opera; assumes default friendSpace width !}
table table td.text table.friendSpace td.text table table td {width:107px !important}
{! view friend link; override positioning for shows !}
table table td.text table.friendSpace td.text table div {position:static !important; height:auto !important;}
</style>
<span class="off">!-END Display Friends-!</span>
The above code should cause your friends (class="friendSpace") to show up just above your comments.

If you want to position your friends and/or Comments, and NOT use a scroll box, insure you have enough space to accomodate them. There are our choices:
1) Keep Comments at the bottom, set our main div to height:auto, and allow the comments to grow as needed.
2) NOT display our friends, and put our comments in a scroll box, and place the box anywhere on our div
3) Put both our Friends AND Comments in a scroll box, and place it anywhere on our div.
There is NO reasonable way to put the comments in their own scroll box, and display the friends, outside that scroll box, without a custom friend Space.
There is a way to put only the friends in a scroll box, and leave the comments outside the scroll box. (ask if you are interested).

The below scroll box will include your friends (if you have rendered them displayed) AND your comments (if you have rendered them displayed). If your friends are still hidden, then only your comments will end up in this scroll box.
I will place this scroll box the empty box on the left bottom of my div.
To do this I place this code at the end of the bio section:
<span 
class="off">START Block to Put Comments in Div</span>
<style>
{!- comment div style stuff -!}
div.myDclassFC {width:360px; height:260px; overflow:scroll; overflow-x:hidden;}
div.myDclassFC {position:absolute; top: 410px; left:20px;}

table.friendsComments, table.friendsComments td, table.friendsComments table, table.friendsComments table td {width:100% !important}
table.friendsComments table table td {width:auto !important; border:1px silver solid; border-collapse:collapse}
{!- OPTIONAL: size control to keep comment images small -!}
table.friendsComments img {width:230px !important;}
table.friendsComments a img {width:70px !important;}
table.friendsComments .ImgOnlineNow {width:40px !important;}
</style>

</td></tr></table></td></tr></table></td></tr></table>
<div class="myDclassFC" style="border:0px purple dashed">
<table class="myTclassFC"><tr><td class="text">
<table class="off"><tr><td>
<table class="off"><tr><td>
<span class="off">END Block to Put Comments in Div</span>
The result (which still has the grid on it for reference) can be found here:Click Here to See Page

Importing the Friend Space, into your Div

Click Here: Styling and Sizing the mySpace friend Space

Blogs
I did not put a space on my template for the blogs.
However, I later decided to import them. I found some room.
(I am actually thinking, that from a design perspective, maybe I should put the blogs where I have the friends and Comments, and then put the friends and comments at the bottom, side by side.)

Blogs are not static in size. They do not size the same in IE and FF
you can improve this by hard-setting the line-heights and font size and carriage return (br) heights.
Use px values not pt values for the most consistency across platforms.

Leave room, at the bottom, for expected growth OR place at the bottom of your overlay and insure the height (of your main outer div) is set to auto.

The following code block will make the blogs visible, and position them on the page.
I also added in some styling for sizing consistency, coloring, and width.

<span class="off">!-START Import for Display; blogs into Div Overlay -!
</span>
<style>
{!-display and position blogs-!}
table table table.latestBlogEntry {display:block;}
table table table.latestBlogEntry {position:absolute; top:313px; left:15px;}

{! size to the width you have avaialble -!}
table table td.text table.latestBlogEntry, table table td.text table.latestBlogEntry td {width:370px !important}

{!-sizing for consistancy-!}
table.latestBlogEntry td {font-size:11px; line-height:13px; height:15px; padding:0px; margin:0px;}
table.latestBlogEntry br {line-height:11px;}

{!-coloring and borders for blogs-!}
table.latestBlogEntry {background-color:HotPink !important}
table.latestBlogEntry td {background-color:LavenderBlush !important; }

table.latestBlogEntry span.btext {color:purple;}
table.latestBlogEntry a {color:Chocolate; font-size:10px; }
</style>
<span class="off">!-END Import for Display; blogs into Div Overlay -!
</span>

Removing the border around the links
Add the following block.
<style> 
a img {border:none !important}
</style>


Adding a Custom Comment Input Box
Put the following code block inside your Content area. (This is the area between the "START CUSTOM CONTENT HERE" and "END CUSTOM CONTENT HERE") in the Band Members area. Change Tom's friend id (6221) to your friend id:
<span class="off">!-START COMMENT FORM-!</span>
<div class="myCommentFormD">
<form method="post" action="http://comments.myspace.com/index.cfm?fuseaction=user.ConfirmComment">
<input name="friendID" value="6221" type="hidden"/>
<textarea name="f_comments" class="myFormBox"></textarea>
<center>
<input type="submit" value="Post Comment" class="myPostCommentButton"/>
<input type="reset" value="Clear" class="myClearButton"/>
</center>
</form>
</div>
<span class="off">!-END COMMENT FORM-!</span>


Next Style the Box to Meet your specific needs.
You will want to modify the below block to suit your page. Put this style block in the "Band Members" section, near the top, under where it says "START Custom Content Style Section"
<span class="off">!Start style block to style Comment Form!</span>
<style>
div.myCommentFormD form {display:block !important;}
{!-change px values to position form on your layout-!}
div.myCommentFormD {position:absolute; top:0px; left:0px;}
{!-change px values or font attributes to size and style your form-!}
textarea.myFormBox {width:384px; height:105px; color:000000; font-size:9px; font-family:comic sans ms;
background-color:transparent;
border:1px silver solid;}
{!-style buttons or remove below line for default button style-!}
div.myCommentFormD input {width:110px; height:22px; border:2px brown inset; background-color:transparent}
</style>
<span class="off">!END style block to style Comment Form!</span>


Creating a Custom Scroll Space
(This is why I left the "sounds like" section empty.)
I am going to place this block in the "sounds like" or "influences" section.
If you left one of these sections empty, it will be less cluttered.

This will make it easy to find this block, to update it.

You can either allow this to fall naturally underneath your "core", or you can use absolute placement to position it anywhere on your div.

The below example uses absolute positioning.
(I do not have this block on my sample page).

<span class="off">!-Start Custom Code in Sounds Like-!</span>

</td></tr></table></td></tr></table></td></tr></table>

<span class="off">!-START code for custom text section-!</span>
<div class="myBio" style="width:380px; height:320px; position:absolute; top:650px; left:50px; overflow:scroll">

YOUR BIO DATA GOES HERE.

</div><span class="off">!CLOSE Text Div!</span>
<style>
table div.myBio {display:block; visibility:visible;}
</style>
<table><tr><td><table class="off"><tr><td><table><tr><td>
<span class="off">!-END Custom Code in Sounds Like-!</span>


Thank you for Visiting; Have a Nice Day :-)

Queries hitting other pages of mine, which should be hitting this page:
-How do I hide whole myspace page.
-I have div overlay codes?
-I have code to hide everything except player on myspace band page
-I show how to create a myspace band div overlay
-And I show how to hide what is behind a div overlay on band page
-How to hide entire myspace music page
-div over la y how to do one
-this section shows how to hide everything on myspace artist band page.
-div overly do not hide bottom links

Labels:

Saturday, April 14, 2007

myspace band div overlay with profile views profile image

Band Page Div Overlay with Profile Image and Profile Views


If you are NOT going to import any content from the top left (where the profile image, location, page views etc ... reside) then this is NOT the strategy I recommend.
Instead please use this article:
Band Div Overlay MySpace Tutorial

If you ARE going to import content from the top left, then this is the best strategy I have been able to come up with.

(I am still not sure this is worth the work, but multiple people have requested the ability to import content from the top left.)

Allow Place code into the headline to Alter the Table Structure and allow for further classification of the top left space

Place the following code into the headline:
</font><p><table class=H><td><table><td><p><font>

Create the Core of our Structure
This will create a core structure that we will later fill in.
I have changed the order around slightly from my previous tutorial. Due to the code we placed in the headline, we need to close additional tables, to get the profile back in balance.

Place the below code block into the Band Members Space.
<i class=i>!--START CODE IN BAND MEMBERS --!</i>
<i class=i>
!-Start Div Overlay Content Block-!
<a href="http://views-under-construction.blogspot.com/">
myspace code tutorials by Eileen</a>
!-Close 5 layers of cell/row/table. This puts our Div ONE table deep.
Assumes we opened 2 extra table layers in headline
</i>
</td></tr></table>
</td></tr></table>
</td></tr></table>
</td></tr></table>
</td></tr></table>
<i class=i>!----PUT TOP BANNER CODE HERE----!</i>





<i class=i>!----END TOP BANNER CODE--!</i>

<i class=i>!-Create and size our div. We will never close this div. It will close when the containing table closes-! </i>

<i class=i>!!! MODIFY width to the SAME width as your core image !!!</i>

<div class="myCoreDiv" style="position:relative; top:0px; width:900px; height:auto; border:2px magenta solid;">

<i class=i> !----START CUSTOM CONTENT BLOCK 1----!</i>





<i class=i> !----END CUSTOM CONTENT BLOCK 1----!</i>

<i class=i>!-Open 3 layers of table/row/cell-!</i>
<i class=i>!-IF do NOT want any content from my Right side, I can use i instead of L1-!</i>
<table class="L1" ><tr><td>
<i class=i>!-The below class i hides the remainder of the general table-!</i>
<table class="i"><tr><td>
<table class="i"><tr><td>
<style>.i {display:none}</style>
<i class=i>END CODE IN BAND MEMBERS</i>
We will add to this structure later.

Look at the page so far. You should see a div, outlined in magenta. Above this div you should see the bulk of the left side of the page.
The stuff above our Div is not logically inside our div. This makes it more difficult to place accurately inside of our div.

Hide Page Content
The hide code below is designed to work with the code which has already been placed into the headline and the band members. Because the table structure has been altered, this code will NOT work without this complete strategy.

Place the following code into the Influences area:
<i class=i>!-START Custom code in Influences-!</i>

<i class=i>!-Start Hide Style Block for Div Overlay-!
!-shameful self promotion-!
!-<a href="http://spiff-myspace.blogspot.com">
mySpace code tutorials Author:Eileen</a>
</i>

<style>
.i {display:none;}
{! turn off all background color !}
table, td, tr {background-color:transparent}

{! eliminate blank form; no longer effects google search without important !}
form {display:none}

{! eliminate margin on top of search div !}
body div table td div {
margin-top:0px !important; margin-bottom:0px !important}

{!-hide some junk space-!}
table table,
table table td {border:0px; padding:0px !important; margin:0px !important}
br {display:none}
div br {display:block}
table, td {height:auto;}
table table table {margin:0px !important; padding:0px !important;}

{! fix a centering problem, and clear white space caused by clear gifs !}
td {width:auto;}
table td img {display:none;}
{!-RECOVERY there is a lot to recover-!}
{!-recover music navbar image-!}
a.navbar img {display:inline;}
{!-recover top left profile image-}
table table table table td.text img {display:block; }
{!-recover images in our div overlay-}
table td div.myCoreDiv img, div.myCoreDiv table img {display:block;}
{!-google image; safari needs this due to precedence rules-!}
table td div form img {display:inline !important;}

{!-hide everything on left except profile image, name, genre-!}
p table {display:none}

{!-recover top left text area-!}
p table.H, p table.H table {display:block;}

{!-space and format top left text area-!}
p table.H table td {white-space:nowrap !important}
p {width:200px;}
p table, p table td {width:auto}
p table.H table td p br {display:inline;}
{! insure online now image does not throw things i !}
table.H p img {position:absolute;}

{!-remove hanging quote from headline-!}
table.H font {display:none;}

{! remove view my .. !}
table.H table td {font-size:11px; visibility:hidden;}
table.H table td a {display:none;}
{! needed positioning for cross browser consistancy !}
{! Safari has issues with setting br line height !}
table.H table td p {visibility:visible;
position:relative; top:-20px; margin-bottom:-30px; }
{! YOU MAY ALTER above px values !}

{!-hide name -!}
span.nameText {display:none;}
{!-hide genre and left headline quote, may effect shows-!}
table table table td.text font {display:none;}

{!-Hide Right Side-!}
table div.myCoreDiv table td.text table {display:none;}
table div.myCoreDiv table td.text br {display:none;}
table div.myCoreDiv table td.text table br {display:block;}

{!-Hide comment table-!}
table table.friendsComments {display:none;}

{!!ADDITIONAL STYLE COMMANDS CAN GO HERE!!}



</style>
<i class=i>!-END Custom code in Influences-!</i>
Notice I have a Start And End note. When you enter additional style blocks into this space, you should do so AFTER the start note, and before the END note. This makes it easier for me to find all of the custom code, if I end up trouble shooting your profile.

I did not hide the music player, we will position it in a later step. If you really want to hide it, when we get to the step to position it, you can choose to hide it instead.

At this time, if you have installed the above code correctly, you should have a magenta border, with only the music player inside it. This is our div.
You should have the profile image and the text which goes next to it, showing above our div.
We will place this onto our div later (or you can leave it on top).
We will remove the magenta border later also, for now it is useful.

Add Core Image(s)
If you are not using a core image, but instead using multiple inner div structures, replace this step, with the similar step in the tutorial for creating a div overlay made up of multiple inner floating divs.

I will be using the following image:
http://i11.tinypic.com/7xsglg7.gif
(I created the above image; it becomes obvious why I write tutorials instead of designing profiles :-).

Alter the below code line, replacing my image with your own image.
Place the line into the band members section, just below this: START CUSTOM CONTENT BLOCK 1
<img src="http://i11.tinypic.com/7xsglg7.gif">
If you installed your core image correctly, your music player should move down and now sit below it. Your profile image and text should sit above it.

Next alter the width of the core div to match that of your image.
I set it to 900.
Locate this line:
<div class="myCoreDiv" style="position:relative; top:0px; width:900px; height:auto; border:2px magenta solid;">
Change the 900 to the width of your image. My image has a width of 913, so I will change the 900 to 913.

Add in Links
I draw my link content directly onto my core div image.
I create links by placing clear gif images over the link location, and turning the image into a link. (I have not found an image map syntax which works cross browser on the Myspace pound page, since they blocked the pound sign).

I will create a link over the word friend.
To do this I need the coordinates, relative to the top left corner of my core div.

I have created a grid file you can use, to help get measurements.
You can temporarily add this line, to use my grid.
<img src="http://i11.tinypic.com/4pczehk.gif" style="position:absolute; top:0px; left:0px;">
Place this line UNDER the last img line you placed. The grid may stick out on the right side, this is not a problem. We do not want to resize it, as this will mess up the grid measurements.
The grid has a pink line every 10px; and a dark green line every 50px.

Another way to get measurements is to download the firefox developer tool bar. I have a few links on my side bar you can use. The tool bar provides line guides for measuring. However, they measure based on the full page, not our div, so some math is needed.

I get the following measurements for the links I have drawn onto the above image.
Measurements for the above image:
Friend: top:190px; left:60px; height:40px; width:90px;
Favorite:top:50px; left:215px; height:30px; width:90px;
Message: top:88px; left:343px; height:30px; width:90px;

Now I place my clear gif images. I am going to use the image provided by myspace. This is likely already in cache, as myspace uses it multiple times on the page.

Code I used to place the Add Friend Link:
<a href="http://collect.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendID=262634978">
<img src="http://x.myspace.com/images/clear.gif"
style="width:90px; height:40px; position:absolute; top:190px; left:60px;"></a>
In most browsers you will notice a blue line around the link area. We can remove that later. For now it is useful for seeing the exact boundaries of our link.

Follow the same procedure as above for all of your links.

Placing the Music Player
I drew in a frame for the music player onto my core image.
First I get my measurements measuring from the top left of my Core Div.

I am keeping all of my style blocks in the influences area.
I have a choice, I can either make a complete style block and place it OUTSIDE of my existing style block; OR I can leave the style tags off, and place this inside my existing style block.
In this example I will leave the style blocks off and I will place this code INSIDE an existing style block.
I place this line just BEFORE the </style> near the end of the Influences Section:
{! position music player !}
table table td.text object {position:absolute;
top:146px; left:409px;}
If you instead want to remove the music player, then instead add this line:
{! remove music player !}
table table td.text object, table table td.text embed {display:none;}
IF you have other objects you are using, you must give them their own class, so that they can be individually positioned OR rendered display:block.

Import Shows
After rendering this space display:none, and being required to now render it display:block, does mess up the formatting. There is no ideal way to handle this.
I choose to just re-format the whole space, if I choose to display it.

You can make the space visible, and position it as follows. Again I choose to not include style tags with this line, but instead place it inside an existing style block.
I place this line just BEFORE the </style> near the end of the Influences Section:
{! recover and position shows !}
table table td.text div table {display:block;}
table table td.text div {position:absolute; top: 550px; left:32px;}
{! Reverse effect on Friend and Comment Divs !}
table table td.text table.friendSpace div,
table table td.text table.friendsComments div {position:static;
overflow:hidden; height:auto}
I have an article on styling and sizing the show space here:Size and Style MySpace Band Shows

place comments neatly at the bottom
To get the comments to place neatly at the bottom, do the following:
1st remove this line, which is part of the hide code:
{!-Hide comment table-!}
table table.friendsComments {display:none;}
Then add the following line. Place it before the end style tag, so it is inside the style block:
{!-display comment table-!}
table div.myCoreDiv table.friendsComments,
table div.myCoreDiv table.friendsComments td.text table {display:block;}

Top Left Content
Right now this content is sitting at the top of our div.
We have a few options for moving it onto our div.
We can use
1) Relative Placement, measuring from the current location
2) Absolute Placement, measure from the top center of the page.
3) A combination (sort of) of the above. First use absolute so that the page positions itself naturally as if the top left content was not in the way.
Then use margins to move it to the correct location on the page.

I am going to use (3) so that my positioning is not dependent on how much space the top content takes up. Myspace mucks with this, and I am certain that my strategy for condensing the space above the search menu, will be broken (because the same strategy can be used to remove the search completely).

First do this, and observe the effect:
Place this code BEFORE the close style tag near the end of the Influences:
{!-position top img and text-!}
table table table table td.text img {position:absolute; z-index:9}
p {position:absolute; z-index:9}
You can add margin values to the above to move the sections within your div.
This will put my profile image, for my example, in one of the whole notes on my diagram (the oval with the clear center)
table table table table td.text img {margin-left:-135px; margin-top:110px}
table table table table td.text img.ImgOnlineNow{margin-left:0px; margin-top:0px;}

Remember that some positioning has already been used, for the p within the outer p, earlier. We can also clip the P to remove the top and/or bottom of the text.

What does NOT work (unless you do not care about Safari) is to make the size of the BR smaller to decrease the space between the lines of text. It may not be possible to get the alignment to work EXACTLY the same cross browser. I got it very close with Safari causing the most trouble.
Play with the numbers.
In the end you may end up agreeing with me that just re-creating the content in this space is much easier than trying to fit it neatly into a div overlay.

This works very well in IE, Opera, Mozilla and FireFox, but had no effect in Safari.

Labels:

Friday, April 13, 2007

mySpace Simple Div Overlay

Creating a Super Simple Div Overlay for your MySpace Page
This div overlay strategy does NOT hide the bottom links, it pushes them down based on the size of you div overlay. MySpace has deleted profiles, for not showing the bottom links.

The Rules, related to what Code myspace filters, have changed. As a result this Div Overlay strategy no longer works.
I highly recommend upgrading to myspace 2.0. For Div Layout (Div Overlay) instructions, for myspace 2.0, go here:
MySpace 2.0 Div Overlay Div Layout Tutorial and Code


TO REMOVE THE PINK/magenta BORDER, set the px width of the myCoreDiv class to 0. It is good to make the last step. Having the border helps with troubleshooting

If you are creating the div for the artist band page, go here instead:
mySpace Simple Div Overlay Band Page

Modified 22 July due to myspace code changes

This is the div overlay we will be building in this tutorial:
Click Here To See the Page
(assuming myspace is actually up, more and more one just gets that expected error message).

This Process Consists of the following steps:
1) Create a Div, Image or Flash File which will make up the "Core" of your profile. This image (or flash file) can have any desired links drawn onto it. It can also contain blank areas to use for any of the following:
- The placement of images which are not drawn onto your core image
- The placement of text boxes
- The placement of videos or other objects
- the placement of Content we import in from the default page, such as blogs, friends, comments, music player, calendar.
- etc ...
This is an ideal strategy if you want to hide everything on your profile and replace it with a single image or flash file.


2) Hide Everything between the top menu area and the bottom links. (This block can be used, to hide the whole myspace page, without using the rest of this tutorial.)

You can choose to keep some content. That content is clearly commented in the code.
You can choose to NOT use all of the lines of code.

3) Create a Div which sits just under the top main menu and just above the bottom Links. We will do this in a way that allows the div to automatically center itself, and the bottom links to move down as much as needed.

4) Place Your Core Image (or Images).

5) Create Links. In this tutorial I do this by placing clear gif images over the locations, on your core image, the links belong.
Later I will cover some other methods of creating links.

6) Place Content from Default Page.


7) Create and Place Additional Content if desired.


STEP 1: Create the Core of your Content
By this I mean a main image, or flash, which you will use as the building block for your profile.
I am not going to show you how to do this. I did mine in PaintShop.
You can use any paint type program, or several online programs, to do this work.
I might provide some links to some later.

For this example we will use this "core" image:
Click Here to See the Image
(I was in the mood to draw circles. It is a good thing I majored in Computer Science instead of Art :-).

STEP 2: Hide Default Page Content
I am choosing to keep my ad banner, search, shortcuts, top menu, and bottom Links.

Place this code in the About Me.
<a class="i" href="views-under-construction.blogspot.com">
MySpace Code and Tutorials by Eileen
Hide Content for Div Overlay
<style>
.i, div.clearfix i i.i {display:none;}
table table table,
table table td.text table.blurbs {display:none}

table table td.text table {display:block;}

{! blogs; remove below line to show blogs !}
table table td.text table.latestBlogEntry {display:none}

{! friends; remove below line to show friends !}
table table td.text table.friendSpace {display:none}

{! Comments; remove below line to show comments !}
table table td.text table.friendsComments {display:none}

{! status message; remove below line to show status !}
table table td.text table.extendedNetwork {display:none}

{! remove borders from link images !}
a img {border:none !important}

{! clear space to left !}
table td img {display:none}
{! recover div img !}
table td div img {display:block}

{! get rid of more excess space !}
table td {height:auto !important;}
table table br {display:none}
table div.myCoreDiv table br {display:block;}

</style>
End Hide Code For Div Overlay </a>
If you want to hide any of the content in the top search/menu area see this article:
Style or Remove content in Top Search/Menu area

Step 3: Create a Core Div to put our our Content in, Between the top Menu and the Bottom Links
Place this block in the interests section.

I am going to use the "General" interests Section.

I next paste the below code block into the General Interests Section:
<i class=i>
Hide stuff to prepare for Div Overlay
<a href="http://xiii.us/ms/div-overlay">myspace div overlay code tutorial by Eileen</a>
</i>
<i class=i>!-Begin Block to set Table Level and Open custom Div-!</i>
<i class=i>Close ALL open tables so that our div is not effected by the stuff we have removed </i>
</td></tr></table>
</td></tr></table>
</td></tr></table>

<i class=i>!!Create and size our div.!! </i>
<div class="myCoreDiv" style="width:900px; height:auto !important; border:1px violet solid; position:relative; top:0px; overflow:hidden; z-index:0;">
<i class=i>!!-----START Core Custom CONTENT------!! </i>



<i class="i">!!-------END Core CUSTOM CONTENT--------!!</i>

<i class="i">!!Open same number of tables we closed.!!
</i>
<table class="myTclass0"><tr><td class="hideIfInInterests">
<table class="i"><tr><td>
<table><tr><td>
<i class="off">!-END Custom Block to Set Table Level and Create Custom Div-!</i>

Set the width to the Width of your own core image. I used 900px.

Step 4: Place Core Image.
Just below where it says "<span class="off">!---START Core CUSTOM CONTENT -----------!</span>"
Insert your image, i.e.
<img src="http://i178.photobucket.com/albums/w275/madeline_fogg/core2_cbg.gif">
Replace my image URL with your own Image URL.

If you have multiple images, list them one after the other. (Assuming they are clean horizontal image slices).
[Do NOT Slice your image unless it is too large for the site which hosts your image.]

Insure that the width of your image is the same as the width defined for the div. I have it set to 900px. If that is not the width of your image, you will need to change the width value.

Step 5: Create Links
The assumption here, is that the links have been drawn onto your core image. I will show how to place other types of links later in this article.

Get Measurements. Since we are measuring from the top left corner of our Main Div (and of our core image) The easiest way to get measurements may be to place a grid over the top of our image.

I have created a grid for this purpose.
I place the following code below the code I placed above (just below the core image).
This code is temporary and we will remove this code when we are finished.
<span class="off">!!!TEMPORARY To Place Grid!!!</span>
<div class="grid" style="width:900px; height:800px; overflow:hidden; position:absolute; top:0px; left:0px; z-index:0; ">
<img src="http://i11.tinypic.com/4pczehk.gif"></div>
The black lines are drawn every 50px and the pink lines every 10px.
My first link is the area with the text "Be My Friend"
I get this:
top:210px; left:120px
I get a size of
width:60px; height:50px
I will create my link by placing a clear gif over this area, and turning the gif into a link. I will use the same clear gif which mySpace uses in their default code.
I get the following:
<a href="http://collect.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendID=6221"
style="position:absolute; top:210px; left:120px;">
<img src="http://x.myspace.com/images/clear.gif"
style="width:60px; height:40px; "></a>
I put in Tom's Friend ID (6221), You will want to use your Friend ID.
I place the code block, inside my core content area, just under the last block I placed here.
[There will be a blue border, red on hover, over the link area. When we are done we will remove these. For now they are good for seeing exactly where our link is.]

I use the same technique to place the rest of my links.

Step 6: Place Custom Content onto Page.
I am going to place an image.
I want my profile Image on my page, but understand that importing it, is not as easy as just adding code to place the image.

I want to place the image top:30; left:270px. Remember, the measurements are from the top left corner of our core div (and our core image).
I use this code to place the image:
<img style="position:absolute; top:25px; left:270px"  src="http://a542.ac-images.myspacecdn.com/images01/100/m_d1f8240914a1aed367f3d960ba407195.gif">

Because the above needs to be INSIDE my div, I place this block inside my Core Div, just under the last item I added.
It needs to go above where it says END Core CUSTOM CONTENT

You can use the same technique to place other types of content.

I notice I didn't include a link for "View All Comments" when I created my core image.
I can easily add the link, providing the needed text with the link.

I pick the following location for my link: top:400px left:640px

For this example I am going to use both a content block and a style block.
My content block goes in my Content section (within my Core Div)
I use the following code:
<a class="myViewCommentLink" href="http://comment.myspace.com/index.cfm?fuseaction=user.viewComments&friendID=6221">
View<br>Comments</a>
(note: use your own friend id instead of Tom's).
I put a <br> between the two words in my link, to force a carriage return between the two words.
Notice I assigned a class. I am going to use the class, to create a style block.

Before we create the style block, notice where the link ended up.
It should have ended up just under your core image.
It should have taken on the default style attributes for a link (blue and underlined).
We will use a style block to change the color, font-size, font-family, and location of the link.

I am going to put my style blocks, which go with content I have placed in my core, in my music section.
<style>
a.myViewCommentLink {color:black; font-size:16px;
font-family:comic sans ms;
position:absolute; top:400px; left:650px;}
</style>
I did a pretty good job of matching the font style I used for the links I painted directly onto my core image.

Creating An "About" Section
Really this is just going to be a place to write some stuff you want to show up on your Div Overlay.

The easiest way is to just create a div, inside your Core Div, to hold this content.
IF the content is static in size (Not just over time, but across the different browsers and resolutions you expect your page to be viewed in) then you can use absolute positioning, to place the content onto an area on your Core Image.
However, if the content does not size statically, across platforms, this can be an issue. A scroll box can solve this problem.
Or, you can insure you allow enough space, to account for this.

If you want the content to be more dynamic in size; You can instead place the content so that it just falls onto your div, and your div grows as the content expands. This does NOT work with absolute placement.

I will do one of each here.
First I will create a Div, put Text in the Div, and then absolutely position the div in one of the Circles on my Core Image.

[Note: Avoid use of the <p> tag, if you want your content to size consistently across platforms. I have found that <p>, <br> and pt font sizing are the biggest contributors to sizing inconsistency.]

I did use some <span> tags in my text content, so I could format some of the text differently from the other text.

I am going to place this code, inside my Div. This means that I will place it Above the span where I have this END Core CUSTOM CONTENT
I place the following into my Div:
<div class="myText1">
<span class="myTextH">About Red Friend</span>
<br>
(aka Elmo)<br>
<br>
I am one of millions of Elmo Plush Clones.
I am not the Epileptic laughing Version, nor am I the singing Version.
I am just the Plush simple Version.
My Job is to be Cute, so that little kids will ask their parents to buy me.
I am very good at my Job.
</div>
Notice I did not include an inline style tag, in my Div Tag.
I could have.
But instead I am going to create a separate Style block to style and place my text div. I am going to place my style blocks, which go with stuff I put into my core div, in my music section. They could go almost anywhere.
<style>
div.myText1 {color:darkred; line-height:25px;
font-size:16px; font-family:comic sans ms;
position:absolute; top:250px; left:300px;
width:270px; height:270px;
}
div.myText1 br {line-height:10px;}
div.myText1 span.myTextH {color:red; font-weight:bold; font-size:20px;}
</style>



7: Import Content from Default Page
IF you did not include the code lines, to hide the content you want to import, this content should currently be BELOW your core div (with the exception of the music player).
Position the Status Box (What was once the Extended Network Box).

I need to insure I do not have the Status Box rendered {display:none}.
table.extendedNetwork {display:none;}

If you have the above line, in your hide code, remove it.
Notice the result, is to place the Status Box at the BOTTOM, underneath your Core.
Notice that the bottom links moved down to accomodate the Box.

Position and Size the Status Box.
I am going to place the Status Box in the Top Left of my Core.
I have drawn a box there for it.
I want to position the box here:
top:20px; left:20px;

I also want to alter the size/shape of the box, to fit in this space.
width:220px; height:150px;

I want to set the font and line-height to fixed px values, so that the text sizes the same across different platforms. (The myspace style sheet uses pt font sizes which have larger px size variation across platforms than px font sizes. Because all my positioning is based on px distance, I want to use this for my font and line-height sizing).

I end up with this block of code:
<style>
{! size and position Status box !}
table.extendedNetwork {position:absolute;
top:20px; left:20px; width:220px; height:150px;}
table.extendedNetwork, table.extendedNetwork td {border:0px !important;}
table.extendedNetwork span.blacktext12 span {color:darkred; font-size:15px !important; line-height:20px !important;}
</style>
This is a complete style block.
I am going to place this block at the end of the "About Me" section, just under the style blocks already in that section.

Importing the Friend Space(friendSpace)

IF you included the line of code, to hide the friendSpace, remove the line of code.
table.friendSpace {display:none;}


Now your friendSpace should be visible at the bottom of your profile.
If you have left a space, on your Core, large enough to accomodate the Friend Space, and any expected resizing due to your friends changing their pictures, you can now just move the Friend Space to the desired location.

I am going to move my friend Space to box on the bottom right of my core image.
I still have my grid in place, so it is easy to get the needed measurement:
top:570px; left:30px
<style>
{! position friendSpace !}
table.friendSpace {position:absolute; top:570px; left:30px;}
</style>
I notice my friendSpace is over the edge of my space, slightly, so I want to re-size it to fit better.
If you want to adjust the size of the friendSpace, see this article:
Sizeing and Styling the MySpace Friend Space

Importing the Comments (friendsComments) into the Div Overlay

Insure you do not have the following code line, if you do remove it:
table.friendsComments {display:none;}

Your comments will show up center bottom.
I Highly Recommend leaving the Comments There unless you want to hide your friends.
You can NOT put your comments in a scroll box, or do very much to control their length, UNLESS you either hide your friends or put your friends in the same scroll box.
If you just leave them at the bottom, they will push the bottom links down as they grow. You have the full width of the page to expand them, to accomodate those large images people tend to leave as comments.

However, if you do want to put the Friends Comments in a scroll box see this article:
MySpace Friends Comments In Scroll Box, Place anywhere on Page

Importing the Blogs

If you included the following line of code, Remove it:
table.latestBlogEntry {display:none;}

The blogs should show up at the bottom of your core Image (but above your comments and/or friends if they are still in this space).

You can not put the blogs in a scroll box UNLESS you do one of the following:

- Include the status in the same scroll box
- Hide the Status
- Re-Create the Blog Data (this is actually rather easy)

To locate the blog, to another location on the page, do the following:
<style>
{! position blog !}
table.latestBlogEntry {position:absolute; top:20px; left:470px;}
</style>


8:Clean Up
Remove the blue lines from around our link images. Place this style block at the bottom of the style section (you can really put it anywhere except inside another style block).
<style>
{! remove borders from link images !}
a img {border:none !important}
</style>
Remove the Grid. Find the following block of code, it should be just under the line where you added in your core image:
<span class="off">!!!TEMPORARY To Place Grid!!!</span>
<div class="grid" style="width:900px; height:800px; overflow:hidden; position:absolute; top:0px; left:0px;">
<img src="http://i11.tinypic.com/4pczehk.gif"></div>

Remove it.


Are there any other sections people are interested in showing?



Thank you for Visiting; Have a Nice Day :-)

Queries hitting my other articles which should hit this article:
-How do I Hide whole myspace page. Where can I get codes to hide myspace page. I want to put my friends div layout and Hide Everything (no Generator). how to Put an image as a div overlay. How do I do a simple div overlay. How do I make a div custom or make a div simple myspace. MySpace Div Tutorial. How do I install div overlays to myspace page.
I need code to hide entire profile on myspace for a div overlay. Hide what is behind a div overlay
This section shows how to hide everything on myspace
div over la y how to do one ?

MySpace Div Tutorial


div overlay myspace comments display on.
div overlay does not hide bottom links

Labels:

Thursday, April 12, 2007

mySpace Simple Div Float Floating Divs

Simple Div Overlay Using Inner Divs

The main difference between this strategy, and my other strategy, is the use of inner divs instead of a core image.

We will be building this:
My Space Page with Child Div Containers inside an Outer Core Div

My other strategy consisted of one or more core images, which made up what I called the core of the div.
Content was then placed on top of the Core using absolute placement.
The code for this strategy can be found here:
MySpace Simple Div Ovrlay

This strategy replaces the core image with multiple inner divs. These divs are placed, allowing them to fall naturally into the position we want them, and then
floated either left or right (or not at all).
This allows us to create inner containers, which can change height, as content is added, without messing up our layout.
Some of the content from the default page, can be easily placed into an inner div, which is opened BEFORE that content occurs, and closed AFTER that content occurs.
There are limitations, on exactly where we can place the default page content, and still allow it to grow without messing up our layout.

In the below example I will do the following:

- Remove or hide all of the default page content (we will bring some back at a later step)
- Create a core div, which will serve as an outer container (parent) to all of my inner content
- Create multiple inner containers (div blocks)
- Position each of these inner containers without the need to use absolute positioning.

- Build one of the inner div containers so it wraps around our blogs. This allows our blog content to grow.

- Position the friends and Comments at the bottom, in such a way as to allow them to push down the bottom links as they grow.


1) Use the code block in "Step 2: Hide the Default Page Content" of this article:
MySpace Simple Div Ovrlay
Don't worry if you don't want to hide everything, we will bring back what we want later. I like to start by getting it all out of the way.

2) Use the code block in "Step 3: Create a Core Div to put our our Content in"
From the above page. Put this code in the Hero Section.
If you are folling the band tutorial, put this code into the Band Members Section.


Notice I left a gap between these span blocks (which I use for comments since myspace removes anything using official comment syntax):
!!-----START Core Custom CONTENT------!!




!!-------END Core CUSTOM CONTENT--------!!

We will be placing the next several code blocks between the above two lines.
This will put the content inside our core div (myCoreDiv).

Look at this inline style command, that is included with the open tag for the core div:
<div class="myCoreDiv" style="width:900px; height:auto !important; border:1px violet solid; position:relative; top:0px;

overflow:hidden; z-index:0;">

Change the 900 to the desired with for your core div.
In my example I am using 800

Create Top Left Div

If you want the div to grow to accomodate added content, or if the content does NOT size the same cross-platform, you want to set height:auto
If you want the div to be an exact height, you want to set the height to a px value.
If you set a px value, and your content does not fit, you have a high risk of cross browser issues. Y

<div class="myDivTopLeft" style="width:398px; height:auto; float:left">

Content for Top Left Div Goes Here.

</div>


Create Top Right Div

<div class="myDivTopRight" style="width:394px; height:auto; float:right">
Content for Top Right Div Goes Here.<br>

I can put anything I want here, as long as it has a width of 394px or less.

This section is set to height:auto.<br>
As it grows it will push down the content below it, if needed.
</div>


It is possible to put more than 2 containers on the same level. You can float multiple containers in either direction, as long as there is room.
I will cover more complicated examples later.

When we are done placing our divs in our top row, we need to do a clear. IE and other browsers treat Float differently. Float causes a container to not take up

space (similar to absolute placement). If we Clear, we can solve this issue.

Open Center Div (which will hold our blogs)
IF I want my next div to sit below BOTH the left and right div, I clear both. If I only want it to sit below my Right div, I clear Right.
For this example, I will clear both:

Because I want this next div to include content from the default page, I am going to open the Div in one section, and close it in another.
The blogs occur AFTER the Interests section and BEFORE the blurbs section (on the band page after the General Section and Before the Bio section).
The blogs are NOT static in size, either across browsers or across time.
Therefore I want them in a space, which can grow with them.
This is also a good strategy to use for placement of the shows.

I will open this div in the hero section. This code goes INSIDE our Core Custom Content Block.
<div class="myDivCenter" style="clear:both; border:1px green solid" >
(You can replace this with a custom Blog Header or Remove this text. This section will grow as blogs are added.)


Earlier, when we hid all of the default content, we hid our blogs.
We will now unhide them.
Remove the following line of code:
table.latestBlogEntry {display:none;}

Your blogs should now show up inside the div you just created. They should automatically center.
IF you do not want them centered, but instead want them right or left, you can move them using relative positioning.
However, for this particular example, I want them centered in this space.

Open same number of tables we closed
The code is already in the code block we pasted in earlier.
It is always a good habit to keep the close and open table/row/cell tags balanced.
Each time I put content, which I want at the level of my Core Div, I take things up to the level of One Table Deep.
I do the needed close table/row/cell commands in each cell, where I enter this type of content.
This is important, because each time we leave one of the cells (where we are allowed to enter data) the code encounters several close tags. We need these tags to

map correctly.

Prepare the the "To Meet" Section For continuation of our Div
The reason I am choosing my Meet section, instead of my About section, is that it is the LAST data entry point. If I leave this section, with a div open, that div will suck in my friends and comments.

When we left the Hero section we had 2 divs open. Both of these divs are still open.
These Divs are ONE table deep.
The cell we enter data in, in the Meet section, is FOUR tables deep.
Therefore we must close three levels of table/row/cell before we close this div.

I start out this section by closing enough tables/rows/cells to take me OUT of the Blurbs class (which we rendered display:none} and one table deep.
I then close the div (myDivCenter).

I place the below code block in the "To Meet" section (or the "Bio" on the band page):
<i class="off">!-go up to level one table deep-!</i>
</td></tr></table>
</td></tr></table>
</td></tr></table>

</div> <i class="off">!-Close div.myDivCenter-!</i>

Create Lower Center Div
Place the below code block just below the last block you placed in the "To Meet" section:
<div class="myDivLowerCenter" style="border:1px white dashed; height:auto">

Notice this div stretches the entire width of the parent div.

Next put in the content.
Notice that the div automatically grows as content is added, pushing down the bottom link area.

Once your content is entered, close the Div.
After closing the Div,
Open the same number of tables/rows/cells that we closed at the top of this section.
When I am done with a section, I like to put in something to indicate this is the end of the custom code in the section.
This makes it much easier to find the code, after it is merged with the myspace default code.

I paste this block at the end of the "To Meet" section:
</div> <i class="off">!-close div.myDivLowerCenter-!</i>
<i class="off">!-open same number of tables we closed -!</i>
<table><tr><td>
<table class="off"><tr><td>
<table class="off"><tr><td>
<i class="off">!-End custom code in Meet-!</i>


Recover Friends and Comments
Our core div is still open.
If we now remove the code which has rendered our friends and comments {display:none} they should show up after the last div we closed, and inside our core div, and

above the bottom link area.

Locate and remove the following lines of code:
table.friendsComments {display:none}
table.friendSpace {display:none}


Thank you for Visiting; Have a Nice Day :-)


Labels:

Friday, April 06, 2007

myspace table sizing make tables same width size

MySpace, Table Sizing, Making Tables The Same Width Size


IF you want all of your left hand tables to line up, and size the same, you must set the table width wide enough to accomodate the largest element, placed inside the table.
You can hard set a table wider than its widest content element.
However if you set it smaller, then the content will cause the table to stretch.

The same is true for the right side tables.

The default width setting for left side tables is 300px.
The default width setting for MOST right side tables is 450px (myspace was not as consistent here)

Not only were the right size tables not sized consistently, their code for controlling the size of comment images, assumes an even larger right hand table size.
For this reason, I suggest setting the right side tables to 480px, and specifically setting the comment content column to 400px.
ANY SMALLER setting, for the comment table right column, will force you to add in your own image sizing control. This will force you to size ALL link images, in the comment content column, the SAME SIZE, and all Non Link images, the Same size.

To take advantage of the default myspace code, for controlling image and object size, in the comments, AND insure your right side tables size the same, I recommend the following code.
I remove some of the left margin space, and center space, to make room for allowing comment images up to 400px wide.
<a class=i href="http://xiii.us/ms1">
myspace customize code by Eileen</a>
<style>
.i {display:none;}
{! optional border !}
table table table {border:1px solid silver }
table table table table {border:0px }
table table table td {border:0px }

{! smaller left column to make more room for right !}
table table table {width:295px !important}
{! override for deeper tables !}
table table table table table {width:auto !important;}

table table td.text table {width:100% !important}
table.friendsComments,
table.friendsComments table,
table.friendsComments td {width:490px !important; padding:0px !important; margin:0px !important}

table.friendsComments table table td {width:90px !important;}
table.friendsComments table table td img {padding:0px !important; border:0px !important;}
table.friendsComments table table td.columnsWidening {width:400px !important; padding:0px !important; margin:0px !important;}

{! override for deeper tables !}
table table td.text table table table {width:auto !important;}

{! blank space on left !}
table img {width: 0px}
{! space between left and right columns !}
table table img {width:5px}

div table img,
table table table img {width:auto; }
td {width:auto !important;}

{! additional code to control vertical spacing !}
br {display:none;}
table table table br {display:inline;}
{! vertical space between tables !}
table table table {margin-bottom:13px;}
table table table table {margin-bottom:0px;}
{! space between nav bar and top tables !}
table table {margin-top:10px;}
table table table, table.navigationBar table {margin-top:0px;}


</style>

Wednesday, April 04, 2007

mySpace skinny profile

MySpace minimize, make skinny Profile



For MySpace 2.0, Skinny Profile, go here

Because I am recommending that everyone upgrade to myspace 2.0, I will not be dong many updates to my old myspace 1.0 code. However feel free to use it, for now most of it still works.

=== Below is the code for Version 1 ===

I have commented each code section, so you can see how the solution works.
You may want to modify the px values. I set the full width to 513px.
Left Column:200px
Right Column:300px;
space between right and left column:13px;

All of the above can be altered, to customize the width of the various sections of your profile.

This is the updated solution, based on the myspace changes June 2008
<a class=i href="http://www.msplinks.com/MDFodHRwOi8veGlpaS51cy9tcy9za2lubnktcHJvZmlsZQ==">skinny profile myspace code tutorial by Eileen</a>
<style>
{! Skinny Profile code !}
x.i i, .i, .rail {display:none;}
div.profileWidth,
div.profileWidth table,
div.profileWidth table td {width:720px !important;}
div.profile form {position:absolute; top:10px !important; right:10px !important;}
div.srchfield input {width:190px !important;}
div.clearfix div.profile {margin-bottom:-5px !important }

{!-best font for skinny profile-!}
td, td.text, div, form, span, a {font-family:Arial Narrow !important}

{!-eliminate clear gif files-!}
table td img {display:none}
{!-unDo on other images-!}
table table table td img {display:block;}
{!-google form image not effected unless important used-!}

{!-override hard-set cell width values-!}
table td, x.i i .i {width:auto }

{!-full page width except top ad banner-!}
table {width:513px;}

{!-centering stuff-!}
table { margin-right:auto; margin-left:auto}
{!-IE needs below to center-!}
body {text-align:center}
{!-unDo center for other tables-!}
body table table table {text-align:left; margin-left:0px; margin-right:0px;}

{!-distance between left and right columns-!}
table table td.text {margin-left:13px;}
table table table td.text {margin-left:0px;}

{!-left column-!}
table.profileInfo, table.profileInfo table,
table.contactTable, table.contactTable table,
table.userProfileURL, table.userProfileURL table,
table.interestsAndDetails, table.interestsAndDetails table,
table.userProfileDetail, table.userProfileDetail table,
table.userProfileSchool, table.userProfileSchool table,
table.userProfileCompany, table.userProfileCompany table,
table.userProfileNetworking,
table.userProfileNetworking {width:200px;}

{!-Use ONLY if your profile image is too wide-!}
table table table.profileInfo a img {width:90px; height:auto;}

{!-contact table clear gifs -!}
table table table.contactTable table td img {width:0px;}
{!-size link images in contact table-!}
table table table.contactTable table td.text a img {width:95px; height:20px}


{!-right column-!}
table table td.text table,
table.extendedNetwork,
table.latestBlogEntry,
table.blurbs, table.blurbs table,
table.friendSpace, table.friendSpace table,
table.friendsComments,
table.friendsComments table {width:300px;}

{!unDo!}
table.friendSpace table table {width:auto}

{!-friend space sizing-!}
{!-Size inner levels to exactly 1/4 of left column width!}
table.friendspace table table td,
table.friendSpace table table table,
table.friendSpace table table table td {width:75px !important; margin:0px; border:0px; padding:0px;}

{!- set so that img PLUS padding = 1/4 of full table width-!}
table.friendspace img {width:74px !important}

{!-names above friend pictures. I keep these small. FF has wrap issues-!}
table.friendspace table table td a {font-size:9; font-family:Arial Narrow}

{!-ditch picture border-!}
table.friendspace a img {border:0px !important;}

{!-deal with view friends div-!}
table.friendSpace table div {width:98% !important; font-size:8px !important}

{!-Gets rid of some excess space-!}
table.friendspace br {line-height:2px;}
table.friendSpace div {display:none;}

{!video I recommend against having one in a skinny profile !}
table table td.text object, table table td.text embed {width:300px !important; height:310px !important}

{!-decrease space between tables-!}
table br {line-height:2px}
table table table br {line-height:9px;}

{! music player trim to button only !}
table table div {width:46px; height:51px; overflow:hidden;}
table table td.text div,
table table table div,
x.i i .i {width: auto; height:auto;}

</style>
<i class=i>!! End skinny profile Code !!</i>


---- old code is below this line ----
This code can be placed at the top of your about me:
<i class=i>
Skinny Myspace Profile
<a href="http://xiii.us/ms/skinny-profile">skinny profile myspace code tutorial by Eileen</a>
</i>
<style>
{! Skinny Profile code !}
.i {display:none;}
{!-best font for skinny profile-!}
td, td.text, div, form, span, a {font-family:Arial Narrow !important}

{!-eliminate clear gif files-!}
table td img {display:none}
{!-unDo on other images-!}
table table table td img {display:block;}
{!-google form image not effected unless important used-!}

{!-override hard-set cell width values-!}
table td {width:auto }

{!-full page width except top ad banner-!}
table {width:513px;}

{!-centering stuff-!}
table { margin-right:auto; margin-left:auto}
{!-IE needs below to center-!}
body {text-align:center}
{!-unDo center for other tables-!}
body table table table {text-align:left; margin-left:0px; margin-right:0px;}

{!-top navigation bar width-!}
table.navigationBar, table.navigationBar table, table.navigationBar td {width:513px !important; font-size:6px;}

{!-google search form; leave room for select-!}
div table div form {width:420px;}
div table div form input.txt {width:100px !important}
div table div form input {width:45px !important}

{!-distance between left and right columns-!}
table table td.text {margin-left:13px;}
table table table td.text {margin-left:0px;}

{!-left column-!}
table.profileInfo, table.profileInfo table,
table.contactTable, table.contactTable table,
table.userProfileURL, table.userProfileURL table,
table.interestsAndDetails, table.interestsAndDetails table,
table.userProfileDetail, table.userProfileDetail table,
table.userProfileSchool, table.userProfileSchool table,
table.userProfileCompany, table.userProfileCompany table,
table.userProfileNetworking,
table.userProfileNetworking {width:200px;}

{!-Use ONLY if your profile image is too wide-!}
table table table.profileInfo a img {width:90px; height:auto;}

{!-contact table clear gifs -!}
table table table.contactTable table td img {width:0px;}
{!-size link images in contact table-!}
table table table.contactTable table td.text a img {width:95px; height:20px}

{! move music player to top left, button only!}
table table div object, table table div embed {width:45px; position:absolute; top:0px; left:0px}

table table td.text div object, table table td.text div embed {position:static; width:auto; height:auto}


{!-right column-!}
table.extendedNetwork,
table.latestBlogEntry,
table.blurbs, table.blurbs table,
table.friendSpace, table.friendSpace table,
table.friendsComments,
table.friendsComments table {width:300px;}

{!unDo!}
table.friendSpace table table {width:auto}

{!-friend space sizing-!}
{!-Size inner levels to exactly 1/4 of left column width!}
table.friendspace table table td,
table.friendSpace table table table,
table.friendSpace table table table td {width:75px !important; margin:0px; border:0px; padding:0px;}

{!- set so that img PLUS padding = 1/4 of full table width-!}
table.friendspace img {width:74px !important}

{!-names above friend pictures. I keep these small. FF has wrap issues-!}
table.friendspace table table td a {font-size:9; font-family:Arial Narrow}

{!-ditch picture border-!}
table.friendspace a img {border:0px !important;}

{!-deal with view friends div-!}
table.friendSpace table div {width:98% !important; font-size:8px !important}

{!-Gets rid of some excess space-!}
table.friendspace br {line-height:2px;}
table.friendSpace div {display:none;}

{!video I recommend against having one in a skinny profile !}
table table td.text object, table table td.text embed {width:300px !important; height:310px !important}

{!-get rid of blue behind advertisement-!}
div table {background-color:transparent}

{!-decrease space between tables-!}
table br {line-height:2px}
table table table br {line-height:9px;}
</style>


Thank you for Visiting; Have A Nice Day


myspace skinny profile with the space compressed.
This is the most complete skinny profile code, it compresses everything except the ad banner and does not throw the bottom links to the far left.
Bottom links end up compressed and centered.
Top area menus and google search end up skinny compressed and centered.
Only the ad banner retains its default width.
Clear gif spacer files removed or minimized. White space removed or minimized.

Labels:

myspace table section spacing

Controlling the Space between Sections on a MySpace Page



Quick links if you do not want to read through explanations of how the code works:
Control of Vertical Spacing by replacing Carriage Returns between tables with margins.
Control Horizontal Spacing by Removing clear Gif files and Using margins
Horizontal Spacing, increasing/decreasing distance between columns by sizing clear gif spacer
Shift Right Column Further Left
Shift Left Column Further Left
Place a Border Around Center Table Only.
Place a Background for Center TAble Only.
Shift entire page Right Creating whitespace to the Left
Shift entire page Left Creating whitespace to the Right

IF you are someone html and/or css knowledgeable, viewing the following myspace page, will help you to better understand this article.

MySpace page showing table and class boundaries
Band Page showing table and class boundaries

The spacing between columns and tables (which make up each section) is created with a combination of
BR tags (carriage returns)
clear gif files
padding
empty forms
empty table cells (which often contain either a hard set size or padding).

One of the first things I do, when I am customizing a profile, is to take control of the spacing, between the columns, and between the tables.

To do this, I REMOVE the clear gif spacers, and the Carriage Returns between the tables.
I then add in my own margin commands, to control the space.
This allows me to align my top tables, so they line up.

MySpace was not consistent. The right column, has one more Carriage Return on the top, than the left column.
There is also an extra carriage return, after the music player (there are two instead of only one).

Carriage returns do NOT size the same, from browser to browser. In FireFox and IE you can control the size, by setting the line-height of the br tag.
However in Opera (and some versions of Safari), this does not work.
ALL of the browsers (that I test in) allowed me to remove the BR tags completely, and add in my own margins, to control spacing.

Control of Vertical Spacing by replacing Carriage Returns between tables with margins.
The code to do this, is as follows:
<a class=i href="http://www.msplinks.com/MDFodHRwOi8veGlpaS51cy9tcy9zcGFjaW5n">
Control or Minimize Table Spacing MySpace</a>
<style>
.i {display:none;}
{! control vertical space !}
table table br {display:none;}
table table table br {display:block;}
table table table {margin-top:13px;}
table table table table {margin-top:0px;}
</style>
Notice that the top elements, in each of the columns, is now aligned.
Notice that the space, between each section, is now the same.
You can change the 13 to the value of your choice.
You may also choose to instead of margin-top, use margin-bottom.
This will decrease the space between the navigation menu, and the main page.

Control Horizontal Spacing
The next thing I do, is remove the clear gifs, that are causing the space to the left, and the space between the two columns.
I then add in my own margins to control the horizontal spacing:
<style>
.i {display:none;}
{! control horizontal space !}
table img {display:none}
table td {width:auto;}
div table img, table table table img {display:inline !important;}
table table,
table table table table {margin-right:0px; margin-left:0px;}
table table table {margin-left:13px; margin-right:13px;}

{! cause top blue nav bar to spread full width !}
table.navigationBar td {width:800px;}
</style>
(You can alter the value for the navigationBar, or the margins, if you choose)

Horizontal Spacing, increasing/decreasing distance between columns by sizing clear gif spacer
<a class=i href="http://spiff-myspace.blogspot.com">MySpace Code Tutorials</a>
<style>
.i {display:none;}
{! control space between columns !}
{! set below width to desired space between columns !}
table table img {width:200px;}
{! reverse effect on other images !}
table table table img, div table table img, table div table img {width:auto;}
</style>

Place a Border Around Center Table Only.
After we take control of the horizontal spacing (using the code above) it becomes much easier to place border around the main content area.
We can also place a custom background at this level.
The below code block will apply a border:
<style>
.i {display:none;}
{! border around main content area of profile !}
{! to be used with code to control horizontal spacing !}
table table {border:6px groove pink}
table table table,
div table {border:0px;}
</style>
(You can alter the width, style, or color of the border)
i.e. replace
6px groove pink
with
4px solid yellow

Place a Background for Center TAble Only.
You can also now apply a background at this level. Keep in mind this only works well if you have applied the block to control horizontal spacing.
<style>
.i {display:none;}
{! background for main content area !}
{! to be used with code to control horizontal spacing !}
table table td {background-image:url(http://i29.tinypic.com/24phweh.jpg);
background-position:top center;
background-repeat:repeat;}
table table table td,
div table td {background-image:none;}
</style>
The above can be combined with code which applies a background to the body. This allows you to have one image as your body background and ANOTHER image as the background to your main content.

To get a better idea of what I am doing above, you might want to refer to the diagram I link to near the top of this article.

The clear gif files, I am speaking of, have orange dotted borders (as do all images, I did not identify a class for, on the diagram).

The ones we can use, to manipulate the positioning of our profile columns are seen to the far left, and one in the center.

The spacer clear gif to the far left, does throw the profile slightly off center.
But if one considers the similar spacing to the far right (not done with a clear gif) it may actually serve to center the profile.
(I haven't quite figured out what they are doing here).

Shift Right Column Further Left
FIRST use the code block above to remove the Center Clear Gif
If you find that after removing the center clear gif, you still want the right column to move further to the left, I highly recommend that instead of just using relative positioning, you first try to alter the width of the left column.

<style>
{!hard set width of left column! }
table table table {width:300px;}

{!right column set and override above!}
table table td.text table {width:450px;}

{!undo for nested tables!}
table table table table,
table table td.text table table,
td {width:auto !important;}
</style>
It is important that no content in the tables, takes up more than the alloted space, or it will stretch the table.

Some widths which are hard set in the code will be messed up, and some formatting will be lost.
The calendar has some issues. But I think overall this override is an improvement.

Shift Left Column Further Left
<a class=i href="http://spiff-myspace.blogspot.com">
MySpace Code Tutorials by Eileen</a>
<style>
.i {display:none;}
{ remove spacing gif on left }
table img {display:none !important;}
table table img, div table img {display:block !important;}
table.profileInfo img {display:inline;}

{! control spacing on left!}
table table {margin-left:5px;}
table.navigationBar, table table table {margin-left:0px;}
</style>


Shift entire page Left Creating whitespace to the Right
<a class=i href="http://xiii.us/ms/spacing">myspace page spacing margins Code tutorials by Eileen</a>
<style>
{! create large margin on right, shift page left !}
.i {display:none}
table, div {position:relative !important; right:200px !important;}
table table, div table, table div, div div {position:static !important;}
</style>
You can change the 200 to the desired value.

Shift entire page Right Creating whitespace to the Left
<a class=i href="http://xiii.us/ms/spacing">myspace page spacing margins Code tutorials by Eileen</a>
<style>
{! create large margin on Left, shift page Right !}
.i {display:none}
table, div {position:relative !important; left:200px !important;}
table table, div table, table div, div div {position:static !important;}
</style>
You can change the 200 to the desired value.

Labels:

Tuesday, April 03, 2007

myspace center single column profile

Center Profile Into One Single Column

If you want to center your profile, I highly recommend that you upgrade to myspace 2.0
In myspace 2.0, to center your profile, in one centered column, do the following:

select "customize profile" from the top menu
select "change layout" which is in the top right area of the customize page
select the profile template that looks like this:



You can now drag your modules, to where you want them, on the layout.

However, if you really want to keep myspace 1.0, you can still use the code below.

This is the only source I know of, which offers solutions for a one column profile, which does NOT require that one hide a significant chunk of the default myspace page.
I have a few different solutions.
The one which works best for you, depends on what content you want to keep.

Before writing my own solutions, I played with multiple strategies, and evaluated each one for its strengths and weaknesses.
Choosing a MySpace Profile Centering Strategy

Strategy 1) Place Code in the Networking Box.
This effects fewer page elements than strategies 2 or 3
[This was my favorite, however I removed this strategy due to the lack of consistency in myspace, related to converting code entered in this space.]

Strategy 2) Place Code in Heroes Section
[This concept exists in cyberspace already. However after testing the various solutions available, to see if I would just point to an existing solution instead of writing one, I realized that the exiting solutions all had major flaws. I tested each one on a profile with no other customizations. This doesn't mean there is not a better solution out there, but I did not find one. ]

Conceptually, this is the same as Strategy 1, however it requires that a lot more content be placed absolutely within our div (or rendered display:none).

It is the best solution if you do NOT want to display any of the following:
groups
details (or if you have custom details)
schools
companies
networking
However it DOES work even if you want to display some or all of the above. In this case you want to use the 2nd Example, where I return these items to the profile.

Example 1 (using Strategy 2).
Place the below code block at the END of either the Heroes OR the last field, in the interests, where you have data.
<i class=i><a href="http://www.msplinks.com/MDFodHRwOi8veGlpaS51cy9tcy9jZW50ZXItc2luZ2xlLWNvbHVtbg==">
Center Profile into Single Column MySpace Code
Author:Eileen</i>
<i class=i>!- START code BLOCK 1 make page one centered column-!</i>

<i class="off">!-Close tables out to level 1-!</i>
</td></tr></table>
</td></tr></table>
</td></tr></table>

<i class="off">!-Create a Div to be used to more accurately position the stuff below this point, that we want to display-!</i>
<div class="myDleftBottom" style="position:relative; top:-20px; left:0px; right:0px;" >

<i class="off">!-Open same number of tables we closed-!</i>
<table><tr><td>
<table class="off"><tr><td>
<table><tr><td>

<style>
.i {display:none;}
{!-remove clear gifs to improve centering-!}
table img {display:none;}
td {width:auto}
table table table img {display:block;}
table table table.profileInfo img {display:inline;}
table table table.profileInfo td.text img {display:block;}

{!-Positioning and display of all left side elements which were below the Interests section-!}

{!-If you do not want to show interests-!}
.interestsAndDetails {display:none;}

{!-The below elements from the left column must either be rendered display:none; or placed using absolute positioning.
The absolute positioning is relative to the outer div not the entire page-!}

.userProfileDetail {display:none}
.userProfileSchool {display:none;}
.userProfileCompany {display:none;}
.userProfileNetworking {display:none;}

</style>
<i class="off">!-End make page ONE centered Column-!</i>


Example 2 (strategy 2)
In the below example I return the rest of the left column (the stuff that normally comes after the interests) to the profile.
The Below solution has TWO code blocks, you need both of them
Put this code in either the heroes section (after your heroes data and any data you have there to create custom tables below this section). Block 1:
<i class=i><a href="http://www.msplinks.com/MDFodHRwOi8veGlpaS51cy9tcy9jZW50ZXItc2luZ2xlLWNvbHVtbg==">
Center Profile into Single Column MySpace Code
Author:Eileen</i>

<span class="off">!- START code BLOCK 1 make page one centered column-!</span>

<span class="off">!-Close tables out to level 1-!</span>
</td></tr></table>
</td></tr></table>
</td></tr></table>

<span class="off">!-Create a Div to be used to more accurately position the stuff below this point, that we want to display-!</span>
<div class="myDleftBottom" style="position:relative; top:0px; left:0px; right:0px;" >

<span class="off">!-Open same number of tables we closed-!</span>
<table><tr><td>
<table class="off"><tr><td>
<table><tr><td>

<span class="off">!-End BLOCK 1 to make page ONE centered Column-!</span>
The next block can go anywhere (except nested between other style tags since it contains style tags).
The stuff in bold is stuff you probably want to edit. For each left column element, which was initially below the interests section, you will need to either render it display:none OR position it absolutely within the outer containing div.
If you want it gone, set it like I have set the schools (.userProfileSchool).
<style>
.i {display:none;}
{!-remove clear gifs to get better centering-!}
table img {display:none;}
td {width:auto}
table table table img {display:block;}
table table table.profileInfo img {display:inline;}
table table table.profileInfo td.text img {display:block;}

{!-Positioning and display of all left side elements which were below the Interests section-!}

{!-Move down right column stuff. top px value must equal margin-bottom. This is the amount you want to move this down to insert details, schools, companies, networking -}
.extendedNetwork {position:relative; top:400px; margin-bottom:400px;}

{!-The below elements from the left column must either be rendered display:none; or placed using absolute positioning.
The absolute positioning is relative to the outer div not the entire page-!}

.userProfileDetail {position:absolute; top:10px; right:50%; margin-right:-150px}
.userProfileSchool {display:none;}
.userProfileCompany {position:absolute; top:195px; right:50%; margin-right:-150px}
.userProfileNetworking {position:absolute; top:300; right:50%; margin-right:-150px;}

{!-OPTIONAL style stuff-!}
{!-ditch ugly gray behind bottom menu-!}
tr {background-color:transparent;}
{!-restore white to URL-!}
table.userProfileURL table tr {background-color:white !important}
</style>

Strategy 3) put Code in About Me Section
Place this code at the TOP of your about me section, BEFORE you about me content.
<span class="off">!-Start Block To Center Profile in One Column-!</span>

<span class="off">!-Shameful self promotion <a href="http://xiii.us/v/">MySpace Customization Code, Tutorials and Information</a></span>

<span class="off">!-Close out tables/cells/rows out THROUGH the td.text cell which makes up the right column-!</span>
</td></tr></table></td></tr></table>
</td></tr>

<span class="off">!-Create a new row underneath the cell which makes up the right column-!</span>
<tr><td>
<span class="off">!-Re-Open Blurbs Table, assign our own class (we will hide the old class)-!</span>
<table class="myBlurbs" style="width:435px;" ><tr><td class="myBlurbH">

<span class="off">!-ReCreate Blurbs Header if Desired-!</span>
<span class="orangetext15"> My Blurbs </span>
</td></tr>
<tr><td>
<table class="myBlurbsI"><tr><td class="myAboutMe">

<span class="off">ReCreate About Me Header if Desired</span>
<span class="orangetext15">About Me:<br></span>

<style>
{!- If you do not want to hide blogs this is NOT the best centering strategy -!}
table.latestBlogEntry, table.blurbs {display:none;}

{!- you may replace below with position absolute clause-!}
table.extendedNetwork {display:none;}

{!- size what is left of old right column to 0 width-!}
table table td.text {width:0px !important;}
table table table td.text {width:auto !important}
table.myBlurbs td {width:auto}
{!-Background coloring for cell with blurbs header-!}
td.myBlurbH {background-color:ffcc99}
</style>

<span class="off">!-END Block To Center Profile in One Column-!</span>
Code for Band Profile
Put this code at the bottom of the "Sounds Like":
<span class="off">!-START Code to Center Band Profile in One Single Centered Column-!</span>

</td></tr>

<span class="off">Below is to re-create the record label and signed by, remove this block if you don't want this </span>
<tr >
<td width="100" bgcolor="b1d0f0" NOWRAP>
<span class="lightbluetext8">Record Label</span></td>
<td width="175" bgcolor="d5e8fb" style="WORD-WRAP: break-word">
unsigned
</td>
</tr>
<tr><td width="100" bgcolor="b1d0f0" NOWRAP><span class="lightbluetext8">Type of Label</span></td>
<td width="175" bgcolor="d5e8fb" style="WORD-WRAP: break-word">
None
</td>
</tr>
<span class="off">END block to re-create the record label and signed by </span>

</table>
</td></tr></table>
</td></tr></table>
<table class="myTclassR"><tr><td class="off">

<table class="off"><tr><td>
<table><tr><td>

<style>
{!- remove cell used to make space between right and left columns-!}
table.myTclassR td {width:0px;}
table.myTclassR td img {display:none}
{!-remove effect on other content}
table.myTclassR td.text img {display:block;}
table.myTclassR td.text, table.myTclassR td.text td {width:auto !important}
</style>

<span class="off">!-END Code to Center Band Profile in One Single Centered Column-!</span>



For another solution, with less code (not as accurate with the centering, and hides everything left below the heroes) which may meet many needs, you can try this:
Katamari Centered Profile

Thank you for Visiting; Have a Nice Day :-)

Google often sends people to one of my pages, but not the one with the information. This is an experiment to see if I can help direct traffic to the correct page:
Queries which should be hitting this page:
If you are looking for myspace center profile codes OR one column profile code or you want to know how to make your myspace profile one column, you have come to the correct place.
If you want to create a center down profile for myspace OR a one column layout this page shows a few ways to do this. It also covers how to make my myspace profile one column. You can Create a 1 column myspace with only 1 column.
I show how to, In myspace, move everything so each element is under the other elements.
The code moves everything in the profil into one column
center whole profile in one column myspace
centered profile

Labels: