#1 (permalink)  
Old 11-29-2008, 02:51 AM
Leprakawn's Avatar
Moderator
 
Join Date: Jan 2004
Location: Like you, on a tiny speck of dust floating in the Virgo Cluster.
Posts: 1,248
Send a message via AIM to Leprakawn Send a message via Yahoo to Leprakawn
Talking Change your strikethrough colour

Okay, so I saw someone's post on this elsewhere long, long ago, and I was in search of it a while back but could not find it. So, that led me to my own creativity and method of figuring it out. And it seems like there are a few of you out there wondering how to do it as well.

Want to change the colour of your strikethrough or line-through?

Let's go create a 1x3 px, transparent gif/png, and put a single dot—of course, with the colour of your choice—in the middle of it. Save it as whatever file name you want, but for the example, call it strike.png.

Code:
Use this in your CSS:
.strikemeout{
background:url(strike.png) repeat-x;
background-position:center 3px;
}

Then your HTML... 
<span class="strikemeout">Look at me!</span>
Of course, the height position (3px) depends on the size of your txt, so feel free to adjust it as needed.
__________________
This field was intentionally left blank.


Wait a minute... oops.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ

  #2 (permalink)  
Old 11-29-2008, 08:09 AM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,504
Nice information. However, instead of using 3px, you could use ex units (ex is supposed to be the height of a lowercase x in the particular font/size you're using, and em is supposed to be the width of a lowercase m, I believe).

Therefore, if you wanted the strikethrough to run at the top of your lowercase letters, no matter what size you set your text to, you could use "1ex" instead of "3px". If you wanted the line to run through the middle of your lowercase letters, you could conceivably use .5ex.
__________________
I hate Internet Explorer! Anyone with me?
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change menus scarmen Programming and Scripting 0 05-11-2007 09:39 AM
html appear after flash movie also background change colour bobsworld Graphics and Flash 1 03-01-2007 10:00 AM
Change Screen Resolution Ysa Programming and Scripting 6 11-24-2006 01:44 PM
Can I change it? Tati Programming and Scripting 5 11-03-2006 11:21 AM
Background colour not displaying in Firefox... CSS problem? christhorn Programming and Scripting 4 02-02-2006 03:29 PM


All times are GMT -5. The time now is 10:05 PM.

 
Bitrix
Clicky Web Analytics
Maxtango
CloudContacts


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter