----- Original Message ----
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: [email protected]
Sent: Sunday, August 5, 2007 9:16:50 AM
Subject: [css-d] best way to display a non-inline image

Michael asked:

>>What is the most efficient way to display a non-inline image
>>(eg, a logo) that will stand on its own (ie, with no superimposed text, etc)?

fantasai responded:

>If the image has text in it that should be there for the document to
>make sense, then I would use an <img> tag with alt text. For example,

>   <h1><img src="logo" alt="The FooBar Company"></h1>

>   <p>Welcome to the FooBar Company website, blah blah</p>


and David L. responded, as well:

>If  the logo is purely decorative (no image text) then my guess is one 
>would use a background image.

>If the logo has image text then I guess you might call it from the 
>source document (html); and, call the style for it from an external css 
>file (rather than using inline styles). For example:
>#header img {...}
>And, then also provide some means for users,  with or without assistive 
>devises (screen readers), to read the image text. 

Thanks, fantasai and David.  While researching this, I looked up some sites on 
Image Replacement Technique (including Thierry's beautiful site, David), and 
eventually
figured that the Gilder/Levin Image Replacement Technique would be the easiest 
one,
with enough essentials, for me to use.  From what I can understand, that
technique requires a particular approach to displaying the image:

CSS:    #logo {width: [same as image]; height: [same as image]; position: 
relative; }
              #logo span  {background: url(logo.jpg) no-repeat; position: 
absolute; width: 100%; height: 100%;}

Markup:  <h1 id="logo">   
                <span></span> [logo text]
                </h1>

Would this come close enough to your suggestions?

Thanks!

- Michael








      Be smarter than spam. See how smart SpamGuard is at giving junk email the 
boot with the All-new Yahoo! Mail at http://mrd.mail.yahoo.com/try_beta?.intl=ca

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to