Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 01-21-2007, 04:16 PM alternate image
Skilled Talker

Posts: 97
Trades: 0
i know i can use the alt tag for text in a image like so:
<img src="image.png" alt="alternate image text" />

but i am wondering if i can do a alternate image instead of text
so like if image.png doesnt load, then it would load image.jpg
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
raptrex is offline
Reply With Quote
View Public Profile Visit raptrex's homepage!
 
 
Register now for full access!
Old 01-21-2007, 04:57 PM Re: alternate image
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
"alt =" is NOT a tag, it is an ATTRIBUTE of the <img> tag. It is ONLY meant for 'alternate' TEXT. If you want to swap images, you are going to have to use another method, such as javascript.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 01-21-2007, 05:28 PM Re: alternate image
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Ladynred, I think he may be referring to a technique somewhat like the one we can see on http://www.deviantart.com
When they present a list of images, the placeholder have a background logo, which fade when the image screenshot load.

I have never looked at it, but I think they may have set a "background" rule on the class, thus applying this background.

Raptrex, is that what you are looking for ?
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 01-23-2007, 06:12 PM Re: alternate image
Skilled Talker

Posts: 97
Trades: 0
yes i guess thats a way to do what im looking for
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
raptrex is offline
Reply With Quote
View Public Profile Visit raptrex's homepage!
 
Old 01-23-2007, 06:46 PM Re: alternate image
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
well then, that's exactly what I've thought.
http://www.deviantart.com/
They have embedded the img tag inside a span, giving a background-image to the span:
Code:
<span style="background-image: url(http://sh.deviantart.com/shadow/alpha-000000/2.6667-0.35/150/134/logo.png);" class="shadow">
<a href="http://www.deviantart.com/deviation/47203842/?&amp;qh=special%3Apopular" title="Commission Blue Tiger Copic by *WildSpiritWolf">
<i></i>
<img src="http://tn1-3.deviantart.com/fs13/150/f/2007/022/d/1/Commission_Blue_Tiger_Copic_by_WildSpiritWolf.jpg" height="134" width="150">
</a>
</span>
That way, while the image screenshot loads, you see the span background.
I don't know how they match for the background size, but at least you have a starting point.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 01-23-2007, 08:05 PM Re: alternate image
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
The background image in the Span is nothing more than a method of applying a drop shadow to an image. It is not an "alternate image"
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 01-23-2007, 11:48 PM Re: alternate image
Silent77's Avatar
Ultra Talker

Posts: 269
Name: Silent
Location: Ohio
Trades: 0
Great idea if you want to completely kill your bandwidth or load time.
__________________
Firefox
rediscover the web

Please login or register to view this content. Registration is FREE
Down with internet explorer!
Silent77 is offline
Reply With Quote
View Public Profile Visit Silent77's homepage!
 
Reply     « Reply to alternate image
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24699 seconds with 12 queries