RebREBreb ([info]aucune_gloire) wrote,
@ 2004-12-30 18:31:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Rollover tutorial 1b ( a variation )
Okay, for the variation I'll be referencing this tutorial with http://www.livejournal.com/customview.cgi?styleid=493319&user=aucune_gloire. Please be sure to have read http://www.livejournal.com/users/aucune_gloire/62776.html?view=649784#t649784 as I will skip over alot of redundent explainations and skip straight over to the coding. If you're using mozilla and firefox then you should be using this one. It's a bit more complicated than the other but if you're CSS savvy, no problem. Paintshop pro indications will be in red and coding in blue.

Graphics Work
You should go about the same way as explained in http://www.livejournal.com/users/aucune_gloire/62776.html?view=649784#t649784. Nothing really changes so go ahead and knock yourself out there. Once you're done with it mosey on over to the codes. Hooray!

Coding
Remember to replace your <img sr="..."> by a div layer containing a text link to wherever it is <DIV ID="userinfo"><A HREF="http://www.livejournal.com/userinfo.bml?user=aucune_gloire">USERINFO</A></DIV>

For this we have 3 subsections instead of 2: a div layer and two link properties of this div layer. XD Try and not get confused between the 3 as I did for about an hour. So use comment coding if you have to remind yourself. To comment in CSS, do the following /* Comments here */ and you have your stick-it all ready for use. It's just like HTML commenting <!-- Look familiar? -->. Right so we have:

#userinfo {
background-image: url('http://pics.livejournal.com/aucune_gloire/pic/0000gpfd') !important; /* I specify !important here just in case it happens to clash with anything else */
background-position: 0px -70px; /* The div layer has the outmouse image */
background-repeat:no-repeat;}

#userinfo a {
text-indent: -1000em;
background-image: url('http://pics.livejournal.com/aucune_gloire/pic/0000gpfd');
background-position:top left; /* Again 0 0 may be used instead. The link has the onmouse image */
background-repeat: no-repeat;
display: block;
margin:0px;
width: 114px;
height: 70px;
overflow: hidden}

#userinfo a:hover {
background-image:none;}


:O As a reminder to people not familiar with z-index. It's basically layers, like your skin. One on top of the other but separate from one another. When not indicated they have their default z-indexes. Backgrounds by default are ALWAYS on the bottom. This can not be altered, no matter how much you try. Okay, back to the idea of the mechanism for this. Basically your div layer has the outmouse image and your link has a background of the onmouse image (same height and width so it totally covers the div layer's image). So when you move your mouse over the image it disappears as specified by your #userinfo a:hover. And now all you can see is the onmouse one. And then you're done.

There are many variations to this. If you don't want the links to go anywhere and have some random rollover then just replace the url with # so it looks like <a href="#">



(Post a new comment)


[info]unbiased
2004-12-31 07:48 pm UTC (link)
Is it possible to have posting access for i-bento please? I just joined.

Thank you!

(Reply to this)(Thread)


[info]aucune_gloire
2004-12-31 11:31 pm UTC (link)
Mmm, show me what you got on the 9th of January. Going on vacation till then. IM or email me. Though prefer instant messages, much better communication.

If you email me pictures send it to bikiniwax@gmail.com

(Reply to this)(Parent)


[info]metallic_angel
2004-12-31 10:46 pm UTC (link)
Happy New Year, Rebbie. :D

one of my new years resolutions: learn rollovers!! >=)

(Reply to this)(Thread)


[info]aucune_gloire
2004-12-31 11:29 pm UTC (link)
>D Happy new year to you too!

:O Are resolutions obligatory for new years?

(Reply to this)(Parent)(Thread)


[info]metallic_angel
2004-12-31 11:43 pm UTC (link)
I'd make it so I'd have to learn rollovers by april but I don't wanna be breaking any resolutions here! >=D

YES LET'S MAKE RESOLUTIONS ALL YEAR ROUND!!! =D

(Reply to this)(Parent)


[info]bloodied_stone
2005-04-09 09:07 am UTC (link)
Hope you don't mind me asking, but I was thinking of trying my hand at a couple of simple rollovers in my next layout and found that the v.pretty layout that you use as your example seems to be using the coding that you say doesn't work in firefox. And yet, my firefox does seem to render it just as well as IE.

Do you know if an update to Firefox or something allows your first rollover tutorial to work in both browsers?

(Reply to this)(Thread)


[info]aucune_gloire
2005-04-09 05:14 pm UTC (link)
You know, I don't know! xD I haven't updated my Firefox since August 03' so maybe they've come up with a CSS update between then and now?

(Reply to this)(Parent)(Thread)


[info]bloodied_stone
2005-04-10 01:21 am UTC (link)
Mayhaps? XD Either way, it's good to know they both work then, wot? ;D

And I meant to thank you - I got the first lot of rollover codes to work last night ((test journal) (not finished yet, of course) but I'm going to try using this code now to see if it fixes some of the flickering i get on a slower connection. o_________o; This is going to be interesting... XD

(Reply to this)(Parent)(Thread)


[info]aucune_gloire
2005-04-10 06:41 pm UTC (link)
Flickering? I see none and it's 56k all up in here. The rollovers look good. I like the shadow like effect on the words.

(Reply to this)(Parent)


[info]prncssleia
2005-06-11 12:11 am UTC (link)
I hate to ask this, as I know this tutorial was a while ago. I used this tutorial and the last one. My code is actually the first one (IE), with the Div layers named "AB", "BC", and "CD" instead of "1", "2", and "3", so it works both in FF and IE. (This tutorial did not work in my IE, and the IE one didn't work in FF, btw...which I'm sure you already knew :D)

For my last link, the hidden part of the image that should become visible on the hover is not showing. If I move it up the page, it does work but throws off the layout. I turned off the overflow in that layer and it still didn't work. Is there a way to do this from left to right instead of up and down so that this would work? I tried to fiddle myself (I did it left to right, and changed the 0px -140px as if the 0px was an x-axis), but no luck. Thank you for the wonderful tutorial, btw. It helped a lot!

(Reply to this)(Thread)


[info]prncssleia
2005-06-11 01:53 am UTC (link)
I apologize for spamming you, I just wanted to let you know that I was wrong. It is working in FF, but you have to scroll passed the div layer I have set up as a sidebar (I have these set up as fixed, which only works in FF). That's the only point where all three links/hovers work. It's rather odd, but I'm going to see if I can find something to fix it. Sorry for the spam, again.

(Reply to this)(Parent)(Thread)


[info]aucune_gloire
2005-06-11 03:15 am UTC (link)
xD Well rollover tutorial B is the better one.
Do you have that layout still up so I can check on it to see what's what?

(Reply to this)(Parent)(Thread)


[info]prncssleia
2005-06-11 03:23 am UTC (link)
I sure do! Can I send you the link? It's for an anonymous contest, so the link can't be posted anywhere. :D

*PS* If you get your comments e-mailed...it was the journal I accidentally replied with and then deleted that comment. *headdesk*

(Reply to this)(Parent)(Thread)


[info]aucune_gloire
2005-06-11 03:45 am UTC (link)
I'll screen the post as soon as you reply.
xD hmm.. I can't find the username in the trash can.

(Reply to this)(Parent)(Thread)


[info]prncssleia
2005-06-11 03:54 am UTC (link)
OK :D

The name is: [info]beater_sarah. The links are on the three largest butterflies on the right hand side. I can't get my div layer to show up right now that says "links" but they are there! ;)

(Reply to this)(Parent)(Thread)


[info]aucune_gloire
2005-06-11 07:22 am UTC (link)
Okay, I'll check it

(Reply to this)(Parent)


[info]aucune_gloire
2005-06-11 07:30 am UTC (link)
Okay, I'm looking at it in IE right now since my firefox /kicks it/ refuses to load at the moment. From what I'm understanding (it's 4AM and xD yeah) the rollovers do not work in Firefox all that great. In IE, which I'm viewing now. It's working perfectly.

In reference to another question you had with the x-axis, it's doable.
I'm sure it's the 3rd number but not too sure.. 0 0 40 0; shift to the right.

(Reply to this)(Parent)(Thread)


[info]prncssleia
2005-06-11 07:47 am UTC (link)
Thank you for checking :D

That is correct. A somewhat brief explanation: In IE, the links are absolute. I did that in the LASTN_WEBSITE override. In your code that I entered into my GLOBAL_HEAD, I entered them as fixed, which of course, IE will not do, but FF did. Although, I know the different coding has nothing to do with it because the last link doesn't work when I enter Position: absolute in both places, either.
The odd thing is...the second link always works. It's very strange.

(Reply to this)(Parent)(Thread)


[info]aucune_gloire
2005-06-11 03:18 pm UTC (link)
Hmm, while I was looking at your CSS I noticed you had two. It wouldn't affect your CSS but thought you'd might want to neaten that up.
table {
width: 368px;
margin-left: 0px;
margin-right: 320px; }

and two of these:
table.entrybox td.caption {
font-size: 14pt;
font-face: century gothic;
background: </b>#e4ddcf</b>;
background-image: url(http://img.photobucket.com/albums/v615/strackany/Prncss%20Icons/icons/subjectline.jpg);
background-repeat: repeat-n;
background-position: top-right;
margin-left: 0px;
}


Okay, there's conflicting CSS in your code. Essentially you have your sidebar 300 pixels from the top and 100% to the right so your sidebar is covering your rollover image #CD (your third rollover) not allowing it to show up. Mmm you can try erasnig the right 100%. It's not necessary since you are already setting it 7 pixels to the left.

(Reply to this)(Parent)(Thread)


[info]prncssleia
2005-06-11 05:59 pm UTC (link)
I can't believe you looked at my code! That was really nice of you, you didn't have to do that.

For the first item, I erased the extra one, thank you.

For the second one, I didn't see a duplicate. I saw that I had the same thing for an index2 instead of caption, maybe that was it?

OK. Now, for the crazy stuff. I have it working. I did take out the right: 100%, but it still wasn't working. Now that I'm not so tired, I looked over the code, and I had set all of the widths at 175 for those div layers. I changed the widths on all of them to the proper amounts. This got the third link working consistently. The first still wouldn't work. After plugging in a few different widths with no luck, I started to change the position. I had it set at left: 700px...well...after moving it around a bit, I discovered that for some reason, it wouldn't work between 600-790px. So I set the first image at left:800px, and it is working now. I'm sure it must be conflicting with something, but now that it's working for this layout, I'm pretty satisfied.
I saw your site was down yesterday, and I don't want to keep bothering you. Is there somewhere I could learn about setting the div layer properties by id in the css like you did for this? I'd like to do it with non-linked images. If you don't know of another place that's okay, don't worry about it. I'm trying google right now. :D

I really appreciate your help. I can't believe how nice it was of you to do that.

(Reply to this)(Parent)


[info]panzerfausts
2005-07-10 07:56 pm UTC (link)
I just discovered this tutorial; thank you so much! I've been wanting to do something other than boring text links for a while, and now I've finally got my layout the way I want it.

Will definitely credit you in my userinfo, and you're more than welcome to stop by my journal and tell me what you think if you've got the time. Again, thanks!

- Lin

(Reply to this)


Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…