Help - Search - Members - Calendar
Full Version: custom contact table?
Forums > Resource Center > Support Center > MySpace Support > Myspace Resolved Topics
hippiehead025
ok, so i made a contact table on Photoshop, its standard size. I also made another thats exactly the same, except the letters have a glowing outline. I want to make the contact table so that when you hover and/or click over the links on the cantact table, the word changes to the outlined version. IS there a code to do this? I know i'd have to slice each "button" on each table. And I know there are codes for changing images when you scroll over them. Would I just implement the image code for the switching images and then designate a link to each image? Thanks - Roger
Mickey
First, you'll need to crop each link on the contact tables you made. Then, you'll need this code to turn them into rollovers. Since that code doesn't seem to have positioning properties, just add some on them so they end up looking like this (unless you want to add any more):

CODE
<style type="text/css">
a.NAME
{float:left; background:url("URL") repeat; width:#px; height:#px; display:block; top:#px; left:50%; margin-left:#px;}

a.NAME:hover
{float:left; background:url("URL") repeat;}
</style>

Just play around with the top and margin-left values to position them. The rest should be explained in the link I posted in the beginning.
hippiehead025
by the beginning, your talkin about the slicing tut, correct? - Roger
Mickey
That's an easy way to do it, sure.
hippiehead025
Not quite sure how i'd do that.... can you enlighten please? Thanks
Mickey
Well if you have an image, just cut it up on Paint or whatever. For example, look at this contact table:



If I were to cut it up, it'd look like this:



The red acts as separators so you know which bits of the image I would've sliced. After taking each piece from the whole image, save them and upload them one by one. It should make a contact table when they're put together. I hope that's easy enough to understand.
hippiehead025
So i'd do something like this???


CODE
<div class="contact_box">
<img src="">
<a href=""><img src=""></a>
<a href=""><img src=""></a>
<a href=""><img src=""></a>
<a href=""><img src=""></a>
<a href=""><img src=""></a>
<a href=""><img src=""></a>
</div>



Then


CODE
<style type="text/css">
a.Message
{float:left; background:url("URL") repeat; width:#px; height:#px; display:block; top:#px; left:50%; margin-left:#px;}

a.Message:hover
{float:left; background:url("URL") repeat;}
</style>




etc, etc.. ?
Mickey
Right. But on the first part, you don't have to include images with the links. Just add spaces or something. And don't forget to use the classes you're creating so they look something like this:

CODE
<div class="contact_box">
<img src="">
<a href="" class="message">&nbsp;</a>
<a href="" class="add">&nbsp;</a>
<a href="" class="IM">&nbsp;</a>
<a href="" class="rank">&nbsp;</a>
<a href="" class="block">&nbsp;</a>
<a href="" class="forward">&nbsp;</a>
</div>

Yeah, something like that should do.
hippiehead025
cool. ty
Mickey
No problem. PM me if you need this reopened. Topic closed & moved.

Edit: Topic reopened. What was the other question?
hippiehead025
what goes at the top part of this code? the <img src= part ?

CODE
<div class="contact_box">
<img src="">
<a href="" class="message">&nbsp;</a>
<a href="" class="add">&nbsp;</a>
<a href="" class="IM">&nbsp;</a>
<a href="" class="rank">&nbsp;</a>
<a href="" class="block">&nbsp;</a>
<a href="" class="forward">&nbsp;</a>
</div>


And also I have 2 more blocks than that to be decribed ( add to group and favorite)

so would I just make these?
CODE

<a href="" class="favorite">&nbsp;</a>
<a href="" class="Group">&nbsp;</a>



Also i have splices that wont be links, so do I just insert them aswell with a

CODE
<a href=""</a>
?

Mickey
Answer to the last question is no. If they're not links, you'd have to insert them as images using <img> tags instead of <a> tags like this:

CODE
<img src="URL">

Just replace URL with the url of the images that aren't links. You can add those other links by duplicating what you already have like so:

CODE
<div class="contactbox">
<a href="" class="message">&nbsp;</a>
<a href="" class="add">&nbsp;</a>
<a href="" class="IM">&nbsp;</a>
<a href="" class="rank">&nbsp;</a>
<a href="" class="block">&nbsp;</a>
<a href="" class="forward">&nbsp;</a>
<a href="" class="favorite">&nbsp;</a>
<a href="" class="group">&nbsp;</a>
</div>

I haven't memorized the proper order of the links so just set them up until they look fine. As you can see, I removed the <img> tag at the top since it's unnecessary. For the DIV class, I changed it to "contactbox" (without an underscore) 'cause I doubt they work with classes. Just make sure you change the class on the CSS bit, too.
hippiehead025
so ill do

CODE
<div class="contactbox">
<a href="" class="message">&nbsp;</a>
<a href="" class="add">&nbsp;</a>
<a href="" class="IM">&nbsp;</a>
<a href="" class="rank">&nbsp;</a>
<a href="" class="block">&nbsp;</a>
<a href="" class="forward">&nbsp;</a>
<a href="" class="favorite">&nbsp;</a>
<a href="" class="group">&nbsp;</a>
<img src=""> <---- times how many splices i have that wont be links
</div>


the a href is where i put the address of the link itself, correct?

then under it do
CODE
<style type="text/css">
a.Message{float:left; background:url("URL") repeat; width:#px; height:#px; display:block; top:#px; left:50%; margin-left:#px;}
a.Message:hover{float:left; background:url("URL") repeat;}


a.add{float:left; background:url("URL") repeat; width:#px; height:#px; display:block; top:#px; left:50%; margin-left:#px;}
a.add:hover{float:left; background:url("URL") repeat;}</style>

</style>



ect...


and it'll show up?
Mickey
It should, yeah. But how about trying the codes first before asking any further questions? That way, you'll know what each code does.
hippiehead025
i'm tryin to, but i need to know what goes where first, i dont know css or html.

ok one last question, where do i put in the images for the actual links ? in the div, or in the style part?

CODE
<div class="contactbox">
<a href=""><img src=""> class="message">&nbsp;</a>
like that?
Mickey
Those codes go anywhere, to be honest, and you won't learn HTML/CSS unless you experiment with them. You can't just have someone do it for you everytime, ok? Learning is beneficial, especially when you have to deal with these kinds of things again for whatever reason.
hippiehead025
well, im lost here buddy. look at my profile. the contact table is f'd up.

www.myspace.com/rrippeon
Mickey
I probably should've mentioned that the images need to match up in one line. I suggest just slicing images using this tutorial. It's easier.
hippiehead025
only probelm is you cant imagemap in music profiles.... so how do i do that?

nvm, i did this....


CODE
<style type="text/css">
.tg_contact {position:absolute; top:XXXpx; margin-left:XXXpx; left:50%; width:XXXpx; height:XXXpx; background-color:transparent; z-index:2;}
</style>

<div class="tg_contact">
</div>

<style>
a.email {position:absolute; top:xxxpx; left:50%; margin-left:-390px; z-index:3; width:xxxpx; height:xxpx; display:block;
background-image:url(URL FOR THE HOVER IMAGE HERE);}
a.email img {border:0px;}
a.email:hover {cursor:default;}
a.email:hover img {visibility:hidden;}
</style>

<a class="email" href="URL OF WHERE YOU WANT THE LINK TO GO TO HERE"><img src="URL FOR THE NON-HOVER IMAGE HERE" /></a>


then just repeated the a.XXX for each link.
Mickey
That's what I told you to do on my first reply, man. Next time, read more clearly. Your problem would have been solved sooner.

QUOTE(Mike @ Feb 19 2009, 04:27 PM) *
Just play around with the top and margin-left values to position them. The rest should be explained in the link I posted in the beginning.

Topic closed & moved.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.