| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
|
|
#4 (permalink) |
|
I know nothing!
Join Date: Jan 2008
Location: Bali, Indonesia
Posts: 102
|
Another question Haku. I have 8 different photos or each link, how do I manipulate the <a href....> to display each of the different rollovers? I know a1,a2,a3 aren't options. Would I use <a id="blah">? Like to know the best scenario for this one. Thanks for your help... |
|
|
|
#6 (permalink) |
|
I know nothing!
Join Date: Jan 2008
Location: Bali, Indonesia
Posts: 102
|
Sorry about that. I have two photo's for each link..the main one and the rollover. It seems that the css code will only work for one rollover image. I need it to work with 8 separate images. homehov...abouthov, etc. Does this make sense? If you go to mpowercj.com it should give you a better understanding of what I am trying o do. I did this with javascript..... Thanks again... hope this was clearer... |
|
|
|
#7 (permalink) |
|
I know nothing!
Join Date: Jan 2008
Location: Bali, Indonesia
Posts: 102
|
one more thing.... I live in indonesia and use hosting in the states. Sometimes I have trouble viewing my site with the domain name but never trouble with the IP. It's not always a problem but it does happen frequently. Any ideas as to why this is? |
|
|
|
#8 (permalink) |
|
shiro
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 2,215
|
You just write different CSS for each rollover image. Give each image a different ID, then use that ID to write the CSS. EX: Code:
Code:
Note: this code will not work as is. Its just to give you the idea to start working from. You will have to add some stuff to make it work. Follow that tutorial. |
|
|
|
#10 (permalink) |
|
trouble free and loverlee
Join Date: Mar 2003
Location: YooKay
Posts: 2,937
|
See also: Google: css sprites rollover |
|
|
|
#14 (permalink) |
|
Paul Michael Smith
Join Date: Apr 2008
Location: Manchester, UK
Posts: 6
|
CSS Sprites for rollovers are a good thing to use. They are great for bringing down the number of HTTP Requests made to the server, for the same reason it means once the image has been downloaded you have all the "up" and "hover/rollover" states cached in the browser. As a designer you can easily update your all your rollovers from one image, with one export rather than lots of seperate files and images to export. See the example below from a site I recently worked on: resources.paulmichaelsmith.com/dt/homepage-nav-states.gif If you set up a PSD correctly you can use the guides in Photoshop to work out the increments for the background position shift. resources.paulmichaelsmith.com/dt/navpsd.gif As with Javascript, CSS sprite rollovers have plenty of issues. The main issue is that there is no easy way to do them that accounts for the "CSS ON - Images OFF" scenario but most people are happy to write that off and not worry about it. It is infact easy to fix that issue but only if you don't need transparency on the rollover. There is an excellent round-up of image replacement techniques at this url: mrclay.org/wd/tests/ir/ - this is valid because its essentially what you are using when doing CSS rollovers unless you are only adjusting the background and still using the text. Here is the code you might use: Code:
Sorry about the images, guessing to prevent spammers you have disabled URLs for newbs to the board. If you paste the URLs in your browser you should get to them fine. :P There's more to this though, you can string together classes in the html. So for example: In the HTML Code:
In the CSS Code:
Would apply both classes to the element. Obviously this is a simple example but you can use this to great effect for overriding default styles and adding slight variations to classes. Last edited by paulmsmith : 21-04-2008 at 09:18. Reason: added more detail |
|
|
|
#16 (permalink) |
|
This is it - ground zero.
|
Some fine techniques, those. I think this was also discussed in 2005, 2006 and 2007 in other threads. Reeeeeeeeeeewind! fun: HGC v.4 | last.fm: DT | me | oi! f*ck u roto: ...via meebo!
New to interweb design? Your friends at dt can help. |
|
|
|
#18 (permalink) |
|
I know nothing!
Join Date: Jan 2008
Location: Bali, Indonesia
Posts: 102
|
Thanks again for all the good feedback. I found Haku's system worked well however my images are PNGs. Have there been any new ways of dealing with PNGs as a background image for IE? The layout looks good in all other browsers but of course IE is a disaster. I tried to change the image format to GIF but the image distorts terribly. Hope someone can help. Thanks again! Will |
|
|
|
#19 (permalink) |
|
Registered User
Join Date: Apr 2008
Posts: 21
|
tutorio.com is best guide to learn css image rollover.Many times i have been got helped from this site.Its really nice. Please stop spamming your link everywhere. Contribute more to the forum before you do that. Thank you. Last edited by emil : 02-05-2008 at 03:30. |
|
|
|
#20 (permalink) |
|
I know nothing!
Join Date: Jan 2008
Location: Bali, Indonesia
Posts: 102
|
Thanks Chetan but it's not the css rollover that is the trouble, it's IE and it's problems reading the PNG image format. Hoping there is a solution now. I checked this problem about 2 months ago and background images were a no go on operation IE. Any new info out there? |
|
![]() |