Shoutbox

css question - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: css question (/showthread.php?tid=68139)

css question by Supersonicdarky on 11-07-2006 at 02:42 AM

how do you get css to automatically itilize all text within and including brackets? ()

i'm tired of typing <i>(123)</i> all the time =(


RE: css question by hmaster on 11-07-2006 at 07:28 AM

I dont think thats possible. Unless maybe you use something like php after you've typed up your code and use str/preg_replace() to put the italic tags in.
Or if you use something like notepad++ then you can do a replace all.


RE: css question by rav0 on 11-07-2006 at 07:39 AM

You could just type "(123)" and then replace "(" with "<i>(" and replace ")" with ")</i>".

I don't think that CSS can automatically add the style to stuff in brackets, but it can add brackets. "<span class="awesome">123</span>" can be styled to show as "(123)", I can't remember how though.


RE: css question by Adeptus on 11-07-2006 at 07:50 AM

Hi,

CSS selectors can match a tag, an element assigned a particular ID, an element assigned a particular class, and certain combinations thereof.

They can not match text patterns and it's difficult to think of a shorter tag than <i> (although I would suggest <em> instead) -- so you are already doing it the best way.