HighDots Forums  

Images in classes

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Images in classes in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
BernieH
 
Posts: n/a

Default Images in classes - 10-15-2004 , 06:29 AM






Can anyone suggest how to insert a small graphic at the start of each
occurence of a class?

Roughly, and without regard to syntax, the page goes something like this -

<class1>
<graphic>
<text>
</class1>

<class1>
<graphic>
<text>
</class1>

<class1>
<graphic>
<text>
</class1>

TIA

BernieH




Reply With Quote
  #2  
Old   
Chris Morris
 
Posts: n/a

Default Re: Images in classes - 10-15-2004 , 06:30 AM






"BernieH" <bhoughton (AT) ozemail (DOT) com.au> writes:
Quote:
Can anyone suggest how to insert a small graphic at the start of each
occurence of a class?
..class:before {
content: ...;
}

Poorly supported by browsers.

Or, better supported, just put the image in yourself as an <img>.

--
Chris


Reply With Quote
  #3  
Old   
Berislav Lopac
 
Posts: n/a

Default Re: Images in classes - 10-15-2004 , 06:56 AM



On Fri, 15 Oct 2004 21:29:03 +1000, BernieH wrote:

Quote:
Can anyone suggest how to insert a small graphic at the start of each
occurence of a class?
Use a background with no-repeat, and top padding.

Berislav


Reply With Quote
  #4  
Old   
Christoph Paeper
 
Posts: n/a

Default Re: Images in classes - 10-15-2004 , 07:24 AM



Berislav Lopac <berislav.lopac (AT) dimedia (DOT) hr>:
Quote:
Use a background with no-repeat, and top padding.
This workaround for browsers that don't understand ':before' and/or
'content' often causes strange gaps in texts, when images are disabled and
CSS enabled, e.g. in the Wikimedia default layout. I recommend to use the
method, which is intended for this and live with non-display in some
browsers.

--
"Some people say I am a terrible person,
I'm not, I have the heart of a young boy,
in a jar, on my desk."
Stephen King


Reply With Quote
Reply




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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.