it is possible to use styles inline, that is, in the body of your html doc. you'd have to specify something like:

<div style="color:red;">i see some red text <span style="color:red;background:black">and i want to paint it black< +/span> </div>
which should show up as red text on your default background, followed by red text on a black background. here it is:

i see some red text and i want to paint it black

as you can see, it didn't work.

in fact, if you view the page source, you should see something like:

here it is:<P> i see some red text and i want to paint it black <P>
perlmonks has a scrubber that removes illegal (as deemed by those most holy) attributes from html tags in the nodes you post.

currently, the style attribute is not allowed. nor are div or span tags. so you can't use CSS inline at perlmonks. but all is not lost. you can use html attributes, like <font>, etc. here's an example, one of saint grinder's sigs...

<SMALL>--</SMALL><H5><TT><FONT color="#cf1178">g</FONT> <FONT color="# +bd2188">r</FONT> <FONT color="#a73598">i</FONT> <FONT color="#904da7" +>n</FONT> <FONT color="#7866b5">d</FONT> <FONT color="#6080c2">e</FON +T> <FONT color="#4999ce">r</FONT></TT></H5>
produces: --
g r i n d e r

this might be a solution for you. but you can't guarantee users will see what you want them to. CSS can override any tag, including <font>. my stylesheet overrides the font tag, so i see dark blue text on a light blue background.

there are a few things, like font tags, that you can modify. feel free to experiment. if you see something you like, view the page source, and practice code reuse.

Update: i *totally* forgot to link to the approved html tags! thanks for the catch, tye!

~Particle


In reply to Re: Re: Re: A meta Style question by particle
in thread A meta Style question by hsmyers

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.