Jump to content

background image of a span tag


gerkintrigg

Recommended Posts

Okay, so I want a background image to the span tag in a similar way to this test: http://www.amazingphrasing.com/test3.php but if you take the code:

<div class="faded_highlight_red">this is a span example.</div>

and replace the div tags with span tags like this:

<span class="faded_highlight_red">this is a span example.</span>

Suddenly the background image vanishes. It needs to be span rather than div, so any suggestions of how to get around the issue?

 

Link to comment
https://forums.phpfreaks.com/topic/195458-background-image-of-a-span-tag/
Share on other sites

I like the concept, haku, but using this code give a line break before and after the span tag. I want it to act just like a highlighter pen (in fact, the background image will eventually look very similar to a highlighter pen.)

<link href="faded_styles.css" rel="stylesheet" type="text/css" />
i want to <span class="faded_highlight_red" style="display:block;">highlight</span> a specific word like this

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.