UKFLATLANDER Posted October 23, 2009 Share Posted October 23, 2009 Hi, I'm a bit new to all this so bear with me, not sure if this should be in this section or the html. I want to strike through text but have the striking line offset from the middle. When strikng out numbers a centrally placed line can make reading the orginal number quite difficult.Any ideas gratefully received. Link to comment Share on other sites More sharing options...
Synook Posted October 24, 2009 Share Posted October 24, 2009 You can have negative margin-bottom with a border-bottom :)There is no technically correct way to do it, however. Link to comment Share on other sites More sharing options...
Ingolme Posted October 24, 2009 Share Posted October 24, 2009 You could do it, by putting the strikethrough in one element, and have a different font size in another element:Here's a little example. It's best to put styles in a stylesheet: <span style="text-decoration: line-through; font-size: 40px;"><span style="font-size: 16px">AAA</span></span> Link to comment Share on other sites More sharing options...
UKFLATLANDER Posted October 26, 2009 Author Share Posted October 26, 2009 Thanks for the reply, but when I try this approach the strike through still end up in the middle of the text, even though the text is spaced more widely due to the 40px element. You could do it, by putting the strikethrough in one element, and have a different font size in another element:Here's a little example. It's best to put styles in a stylesheet:<span style="text-decoration: line-through; font-size: 40px;"><span style="font-size: 16px">AAA</span></span> Link to comment Share on other sites More sharing options...
Ingolme Posted October 26, 2009 Share Posted October 26, 2009 I tested the code using standards compliant mode in Firefox. I'm not sure how it would be rendered in other browsers. You should always have your pages in standards compliant mode (by adding a <!DOCTYPE> tag at the beginning of the page) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.