can u do this? (sub-classes)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frances Del Rio

    can u do this? (sub-classes)

    I've been wondering for a while whether you can do this...

    let's say I define a class thus:

    ..myClass {font-family:verdana, sans-serif; font-size:11px; color:#006699;
    text-decoration:unde rline}

    then I want to define a SUB-CLASS of this one.. i.e., I want to define a
    new class just like this one but w/only one attr set differently, and I
    don't want to repeat all attr's.. so how do I say

    ..subclass-of-above-class {color:#990000}

    so this new sub-class of myClass has all attr's of above class except
    for diff. font color..

    can u do this? thank you...... Frances
  • Els

    #2
    Re: can u do this? (sub-classes)

    Frances Del Rio wrote:
    [color=blue]
    > I've been wondering for a while whether you can do this...
    >
    > let's say I define a class thus:
    >
    > .myClass {font-family:verdana, sans-serif; font-size:11px; color:#006699;
    > text-decoration:unde rline}
    >
    > then I want to define a SUB-CLASS of this one.. i.e., I want to define a
    > new class just like this one but w/only one attr set differently, and I
    > don't want to repeat all attr's.. so how do I say
    >
    > .subclass-of-above-class {color:#990000}
    >
    > so this new sub-class of myClass has all attr's of above class except
    > for diff. font color..
    >
    > can u do this? thank you...... Frances[/color]

    ..myClass, .subclass-of-above-class{
    font-family:verdana, sans-serif;
    font-size:11px;color :#006699;
    text-decoration:unde rline;
    }
    ..subclass-of-above-class{
    color:#990000;
    }

    <p class="myClass" >blue underlined 11px Verdana font </p>
    <p class="subclass-of-above-class">red underlined 11px Verdana
    font</p>

    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
    Now playing: Mötley Crüe - Dr. Feelgood

    Comment

    • David Dorward

      #3
      Re: can u do this? (sub-classes)

      Frances Del Rio wrote:
      [color=blue]
      > I want to define a SUB-CLASS[/color]



      --
      David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
      Home is where the ~/.bashrc is

      Comment

      • Christoph Päper

        #4
        Re: can u do this? (sub-classes)

        Frances Del Rio:[color=blue]
        > I've been wondering for a while whether you can do this...[/color]

        You should have used that time to do a little research. There is a
        similar thread <news:qgeca1tqt vjtl8c0ss7h6p5p 12lj0irfmj@4ax. com> that
        started less than two full days before yours (and many more before).

        Comment

        • Frances Del Rio

          #5
          Re: can u do this? (sub-classes)

          Christoph Päper wrote:[color=blue]
          > Frances Del Rio:
          >[color=green]
          >> I've been wondering for a while whether you can do this...[/color]
          >
          >
          > You should have used that time to do a little research. There is a
          > similar thread <news:qgeca1tqt vjtl8c0ss7h6p5p 12lj0irfmj@4ax. com> that
          > started less than two full days before yours (and many more before).[/color]

          can't get to this "news:...." url, takes me to blank window in news
          reader.. but thank you for yr response.. Frances

          Comment

          • Michael Winter

            #6
            Re: can u do this? (sub-classes)

            On 10/06/2005 01:57, Frances Del Rio wrote:
            [color=blue]
            > Christoph Päper wrote:
            >[color=green]
            >> [...] <news:qgeca1tqt vjtl8c0ss7h6p5p 12lj0irfmj@4ax. com> [...][/color]
            >
            > can't get to this "news:...." url, takes me to blank window in news
            > reader.. [...][/color]

            It is a message ID. Either use it to search through the messages stored
            in your news reader, or strip off '<news:' and '>', and enter it into
            the Google Groups search box.

            Mike

            --
            Michael Winter
            Replace ".invalid" with ".uk" to reply by e-mail.

            Comment

            • Frances Del Rio

              #7
              Re: can u do this? (sub-classes)


              Christoph Päper wrote:[color=blue]
              > Frances Del Rio:
              >[color=green]
              >> I've been wondering for a while whether you can do this...[/color]
              >
              >
              > You should have used that time to do a little research.[/color]

              I know.. just now I needed it all of a sudden for my job.. thank you
              very much to all for your responses.. Frances


              There is a[color=blue]
              > similar thread <news:qgeca1tqt vjtl8c0ss7h6p5p 12lj0irfmj@4ax. com> that
              > started less than two full days before yours (and many more before).[/color]

              Comment

              • Stan Brown

                #8
                Re: can u do this? (sub-classes)

                On Thu, 09 Jun 2005 22:43:15 +0100, David Dorward
                <dorward@yahoo. com> wrote:
                [color=blue]
                >Frances Del Rio wrote:
                >[color=green]
                >> I want to define a SUB-CLASS[/color]
                >
                >http://dorward.me.uk/www/css/inheritance/[/color]

                This page recommends assigning two classes to an element, but I
                thought not all major browsers support that?
                Stan Brown, Oak Road Systems, Tompkins County, New York, USA
                Dragon222 adalah situs slot gacor terbaru yang selalu memberikan banyak bonus menarik dan kemenangan JP untuk pemain setia selama bermain di link slot DRAGON222.

                HTML 4.01 spec: http://www.w3.org/TR/html401/
                validator: http://validator.w3.org/
                CSS 2.1 spec: http://www.w3.org/TR/CSS21/
                validator: http://jigsaw.w3.org/css-validator/
                Why We Won't Help You:

                Comment

                • David Dorward

                  #9
                  Re: can u do this? (sub-classes)

                  Stan Brown wrote:
                  [color=blue][color=green]
                  >>http://dorward.me.uk/www/css/inheritance/[/color][/color]
                  [color=blue]
                  > This page recommends assigning two classes to an element, but I
                  > thought not all major browsers support that?[/color]

                  Internet Explorer is buggy when including two class selectors in a style
                  (i.e. div.classA.clas sB), but other then that I'm not aware of any support
                  problems.

                  --
                  David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
                  Home is where the ~/.bashrc is

                  Comment

                  • Christoph Päper

                    #10
                    Re: can u do this? (sub-classes)

                    Stan Brown:[color=blue]
                    > This page recommends assigning two classes to an element, but I
                    > thought not all major browsers support that?[/color]

                    Indeed, Netscape Navigator 4 does not. (IIRC it handles the first class
                    name of an attribute value just fine, though.) Anyhow, that is not a
                    major browser, but a lieutenant commander one (Navy, y'know). So don't
                    worry about it.

                    Comment

                    • Stan Brown

                      #11
                      Re: can u do this? (sub-classes)

                      On Sun, 12 Jun 2005 13:09:31 +0200, Christoph Päper
                      <christoph.paep er@nurfuerspam. de> wrote:
                      [color=blue]
                      >Stan Brown:[color=green]
                      >> This page recommends assigning two classes to an element, but I
                      >> thought not all major browsers support that?[/color]
                      >
                      >Indeed, Netscape Navigator 4 does not. (IIRC it handles the first class
                      >name of an attribute value just fine, though.) Anyhow, that is not a
                      >major browser, but a lieutenant commander one (Navy, y'know). So don't
                      >worry about it.[/color]

                      If it's not a major, wouldn't it be a subaltern? :-)

                      --
                      Stan Brown, Oak Road Systems, Tompkins County, New York, USA
                      Dragon222 adalah situs slot gacor terbaru yang selalu memberikan banyak bonus menarik dan kemenangan JP untuk pemain setia selama bermain di link slot DRAGON222.

                      HTML 4.01 spec: http://www.w3.org/TR/html401/
                      validator: http://validator.w3.org/
                      CSS 2.1 spec: http://www.w3.org/TR/CSS21/
                      validator: http://jigsaw.w3.org/css-validator/
                      Why We Won't Help You:

                      Comment

                      Working...