Unregistered Avatar

Reply

help


 
LinkBack Thread Tools Display Modes

  #1 (permalink)  

Old 12-13-2006, 01:39 PM

help

I need help on some coding shit...

If I want to put like 50x50 buttons in a table, but when you hover over them they show the full-sized picture; how would I go about doing this?
__________________

I'm a hermy, yes, those were really boobs. Cock is my friend .

(O.o) copy bunny into ur sig
(u u) 2 help him achieve world domination.
Luz

Luz is offline Luz's Avatar

Join Date: Feb 2005

Location: Closet

Posts: 4,222

Send a message via AIM to Luz Send a message via MSN to Luz

  #2 (permalink)  

Old 12-13-2006, 02:04 PM

Re: help

Okay.. i'm assuming this is for myspace, maybe not though. although i'll make it work so it is for myspace.

start with your preview graphic code:

HTML Code:
<a href="#" class="preview"><img src="http://domain.com/preview_image.jpg" alt="alt text" /><div><img src="http://domain.com/full_image.jpg" /></div>
this will show two images at first, but with some careful css we can remove the second one.

HTML Code:
<style type="text/css">
a.preview {
width:50px;
height:50px;
border:0px;
overflow:hidden;
position:relative;
}
a.preview img {
width:50px; height:50px; border:0px;
}
a.preview div {
display:none;
}
Now, this css will create the preview, and hide the full sized image attached inside it. Utilizing the hover action of css we can place the inside <div> anywhere we want on the page. Also, adding position:relative; to the anchor allows us to easily position the large picture in relation to the preview image.

HTML Code:
<style type="text/css">
a.preview:hover div {
display:block;
position:absolute;
top:0px;
right:0px;
float:right;
}
</style>
Display:block reverts the <div> back to its origional state, it is now visible on the screen.
position:absolute; now places that div above everything else on the screen in relation to the anchor with position:relative;
the top, and right properties are just positioning properties. and float:right; is just to allow the inside image to manipulate the size of the <div>.

Hope that helped, i didn't test these at all... so it might not work but i'm pretty sure it will.

missionsix is offline loves you.

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,784

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #3 (permalink)  

Old 12-13-2006, 03:52 PM

Re: help

<div>
<a href="#" class="preview"><img src="http://img.photobucket.com/albums/v415/Sasuke121212/bird.png" alt="Bird" /><div><img src="http://img.photobucket.com/albums/v415/Sasuke121212/birdvector.jpg" /></div>
<style type="text/css">
a.preview {http://img.photobucket.com/albums/v4...21212/bird.png
width:50px;
height:50px;
border:0px;
overflow:hidden;
position:relative;
}
a.preview img {
width:50px; height:50px; border:0px;
}
a.preview div {
display:none;
}


<style type="text/css">
a.preview:hover div {
display:block;
position:absolute;
top:0px;
right:0px;
float:right;
}
</style>



I put that all into it, but it's not working... what am I doing wrong?
__________________

I'm a hermy, yes, those were really boobs. Cock is my friend .

(O.o) copy bunny into ur sig
(u u) 2 help him achieve world domination.
Luz

Luz is offline Luz's Avatar

Join Date: Feb 2005

Location: Closet

Posts: 4,222

Send a message via AIM to Luz Send a message via MSN to Luz

  #4 (permalink)  

Old 12-13-2006, 04:00 PM

Re: help

you didnt close the anchor tag around the last </div>

You also included some stuff you shouldnt have.. here i also fixed some small thing and its viewable here:

http://patandrew.com/test.html

just view source and copy the code between <body> </body> and change the images for the other ones

missionsix is offline loves you.

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,784

Send a message via AIM to missionsix Send a message via MSN to missionsix

  #5 (permalink)  

Old 12-13-2006, 04:12 PM

Re: help

the what and the where?
__________________

I'm a hermy, yes, those were really boobs. Cock is my friend .

(O.o) copy bunny into ur sig
(u u) 2 help him achieve world domination.
Luz

Luz is offline Luz's Avatar

Join Date: Feb 2005

Location: Closet

Posts: 4,222

Send a message via AIM to Luz Send a message via MSN to Luz

  #6 (permalink)  

Old 12-13-2006, 04:19 PM

Re: help

HTML Code:
<style type="text/css">
a.preview {
width:50px;
height:50px;
border:0px;
position:relative;
z-index:100;
}
a.preview img.prev {
width:50px; height:50px; border:0px;
}
a.preview div {
display:none;
}

a.preview:hover div {
display:block;
z-index:300;
position:absolute;
top:0px;
left:0px;
float:right;
border:1px solid #000;
}
a.preview:hover div img {
	border:0px;
	}
</style> <a href="#" class="preview"><img src="http://img.photobucket.com/albums/v415/Sasuke121212/bird.png" alt="Bird" class="prev" /><div><img src="http://img.photobucket.com/albums/v415/Sasuke121212/birdvector.jpg" /></div></a>
To add more images... just copy this part:

HTML Code:
<a href="#" class="preview"><img src="http://img.photobucket.com/albums/v415/Sasuke121212/bird.png" alt="Bird" class="prev" /><div><img src="http://img.photobucket.com/albums/v415/Sasuke121212/birdvector.jpg" /></div></a>
and change the preview image and the full image...

missionsix is offline loves you.

missionsix's Avatar

Join Date: Feb 2004

Location: under you.

Posts: 4,784

Send a message via AIM to missionsix Send a message via MSN to missionsix
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -7. The time now is 09:33 PM.