One sentence beyond css.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • opt_inf_env@yahoo.com

    One sentence beyond css.

    Hi,

    my *.css file contains the following line:

    body {background-color: black; color: blue;}

    It means that text in body will be blue. However I would like to put
    one sentence in my text wich (sentence) have to have another color (not
    blue). Can you tell me how it can be done?

    Thank you.

  • kaeli

    #2
    Re: One sentence beyond css.

    In article <1111765182.572 504.166460@g14g 2000cwa.googleg roups.com>,
    opt_inf_env@yah oo.com enlightened us with...[color=blue]
    > Hi,
    >
    > my *.css file contains the following line:
    >
    > body {background-color: black; color: blue;}
    >
    > It means that text in body will be blue. However I would like to put
    > one sentence in my text wich (sentence) have to have another color (not
    > blue). Can you tell me how it can be done?[/color]

    ..green {color:green;}

    <span class="green">t his text is green</span>

    --
    --
    ~kaeli~
    If God dropped acid, would he see people?



    Comment

    • David Ross

      #3
      Re: One sentence beyond css.

      opt_inf_env@yah oo.com wrote:[color=blue]
      >
      > Hi,
      >
      > my *.css file contains the following line:
      >
      > body {background-color: black; color: blue;}
      >
      > It means that text in body will be blue. However I would like to put
      > one sentence in my text wich (sentence) have to have another color (not
      > blue). Can you tell me how it can be done?
      >
      > Thank you.[/color]

      I would strongly urge you not to have blue text against a black
      background. It's almost unreadable. While aqua provides much
      better contrast than blue against a black background, it might
      still create problems for anyone who is colorblind.

      --

      David E. Ross
      <URL:http://www.rossde.com/>

      I use Mozilla as my Web browser because I want a browser that
      complies with Web standards. See <URL:http://www.mozilla.org/>.

      Comment

      • Lachlan Hunt

        #4
        Re: One sentence beyond css.

        kaeli wrote:[color=blue]
        > .green {color:green;}[/color]

        That doesn't really seperate structure and content from the presentation
        does it, it simply stacks another layer on top of it. What happens when
        the author decides to use a new theme and green is no longer
        appropriate? Should all the markup be changed to match, or just the CSS
        (which would make it inconsistent and confusing.)

        eg.
        ..green { color: red; } ???

        [color=blue]
        > <span class="green">t his text is green</span>[/color]

        It depends what you are trying to markup, not what you want it to look
        like. If, for example, you want emphasis to be shown in green, you
        could use

        <em>emphasise d text</em>

        em { color: green; }



        --
        Lachlan Hunt

        http://GetFirefox.com/ Rediscover the Web
        http://GetThunderbird.com/ Reclaim your Inbox

        Comment

        • me

          #5
          Re: One sentence beyond css.

          "Lachlan Hunt" <spam.my.gspot@ gmail.com> wrote in message
          news:4244d73f$0 $15986$5a62ac22 @per-qv1-newsreader-01.iinet.net.au ...[color=blue]
          > kaeli wrote:[color=green]
          > > .green {color:green;}[/color]
          >
          > That doesn't really seperate structure and content from the presentation
          > does it, it simply stacks another layer on top of it. What happens when
          > the author decides to use a new theme and green is no longer
          > appropriate? Should all the markup be changed to match, or just the CSS
          > (which would make it inconsistent and confusing.)
          >
          > eg.
          > .green { color: red; } ???
          >
          >[color=green]
          > > <span class="green">t his text is green</span>[/color]
          >
          > It depends what you are trying to markup, not what you want it to look
          > like. If, for example, you want emphasis to be shown in green, you
          > could use
          >
          > <em>emphasise d text</em>
          >
          > em { color: green; }
          >
          > http://www.w3.org/QA/Tips/goodclassnames
          >
          > --
          > Lachlan Hunt[/color]

          After reading the link I see your suggestion is quite good. If someone
          wanted a special one time only style I would add the following:

          ..special { font-weight: bold; color: #FF0000}

          I would add this comment to the style:

          /* color red emphasis bold */

          I would then add this to the body:

          <span class="special" >Bold Red Text</span>

          If needed I would adapt the comment to describe any additional formattting
          too, of course this is all OT in this NG. ;-)
          Signed,
          me


          Comment

          • kaeli

            #6
            Re: One sentence beyond css.

            In article <4244d73f$0$159 86$5a62ac22@per-qv1-newsreader-01.iinet.net.au >,
            spam.my.gspot@g mail.com enlightened us with...[color=blue]
            > kaeli wrote:[color=green]
            > > .green {color:green;}[/color]
            >
            > That doesn't really seperate structure and content from the presentation
            > does it, it simply stacks another layer on top of it. What happens when
            > the author decides to use a new theme and green is no longer
            > appropriate? Should all the markup be changed to match,[/color]

            Well, I do.
            *shrugs*

            Then again, I actually keep everything in one document (one CSS and one html
            template), so it's not hard to.

            --
            --
            ~kaeli~
            Every calendar's days are numbered.



            Comment

            Working...