[css-d] Highlighting text

2005-11-10 Thread Shmulik Flint
I'm trying to add highlighting features to a pre tag.

I want it to look like GMail higlight and spell-checking feature, but I
don't want to break the pre tag text into small span tags.

Instead, I want to position a span with a background color over a specific
text, so the text will look highlighted.

 I tried setting the z-index style of the span to -1, but on Firefox, this
completely hides the span behind the pre.

I tried setting the span opacity's to 0.5,, but that makes both the text and
the span blurred.

 Can someone suggest a way to accomplish that on all browsers?

 You can see my test page at
http://www50.brinkster.com/splintor/highlight.htm

 Thanks,

Shmulik
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Highlighting text

2005-11-10 Thread Graham Cook

 
  I tried setting the z-index style of the span to -1, but on Firefox, this
 completely hides the span behind the pre.
 
 I tried setting the span opacity's to 0.5,, but that makes both the text
 and
 the span blurred.
 
  Can someone suggest a way to accomplish that on all browsers?

Change your css as below.

pre { padding: 0; margin: 0;position: absolute;z-index:3; }

#comment1 {
position: absolute;
background-color: #00;
top: 19px;
left: 81px;
width: 76px;
height: 15px;
z-index: 1;
}

Regards

Graham Cook
www.uaoz.com


__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/