typepad (blog sw) -- wrong syntax on their class names??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • maya

    typepad (blog sw) -- wrong syntax on their class names??

    hi,

    I'm writing about generated code in a blog-sw.. (typepad..)
    this is from their code:

    <div class="module-typelist module">

    as far as I know this is wrong syntax for a class-name, right (with an
    empty space in the middle of it)????

    thank you...

  • Jukka K. Korpela

    #2
    Re: typepad (blog sw) -- wrong syntax on their class names??

    Scripsit maya:
    <div class="module-typelist module">
    >
    as far as I know this is wrong syntax for a class-name, right (with an
    empty space in the middle of it)????
    No, it's correct syntax for a list of class names, with a space as
    separator. The <divelement belongs to the two classes. This is well
    supported by browsers. (Very few people use browsers like Netscape 4 which
    didn't get it.)

    --
    Jukka K. Korpela ("Yucca")


    Comment

    • maya

      #3
      Re: typepad (blog sw) -- wrong syntax on their class names??

      Jukka K. Korpela wrote:
      Scripsit maya:
      >
      > <div class="module-typelist module">
      >>
      >as far as I know this is wrong syntax for a class-name, right (with an
      >empty space in the middle of it)????
      >
      No, it's correct syntax for a list of class names, with a space as
      separator. The <divelement belongs to the two classes. This is well
      supported by browsers. (Very few people use browsers like Netscape 4
      which didn't get it.)
      >
      my gosh, this is crazy.. as if all this blog-code weren't confusing
      enough...

      so I have to do:

      .module-typelist, .module { }

      to style this? (since can't change this generated code..)

      why use two different classes for one element? oh man.. ok.. thank you...

      I absolutely hate editing blogs... it's a nightmare....


      Comment

      • Jukka K. Korpela

        #4
        Re: typepad (blog sw) -- wrong syntax on their class names??

        Scripsit maya:
        >> <div class="module-typelist module">
        - -
        my gosh, this is crazy.. as if all this blog-code weren't confusing
        enough...
        Blog code can be confusing, but this is really a _simple_ thing.
        so I have to do:
        >
        .module-typelist, .module { }
        >
        to style this? (since can't change this generated code..)
        No, you can use either

        ..module-typelist { ... }

        or

        ..module { ... }

        as you like, or both, as long as you understand that the rules apply to all
        elements in the given class. Or if you really want to restrict the rule to
        those elements that belong to both classes, you can use

        ..module-typelist.module { ... }

        though this might have some limitations in browser support (sorry, I'm not
        sure about this).
        why use two different classes for one element?
        Well, it's like saying "he is a male engineer", i.e. he belongs to the class
        of engineers and to the class of male people. Rather logical, really. You
        might want style an element both by the rules for one class and by the rules
        for another class. Say, you make all engineers red and all male people huge
        (in font). Then male engineers will look huge and red, whereas other
        engineers just look red and other males just huge.

        --
        Jukka K. Korpela ("Yucca")


        Comment

        • maya

          #5
          Re: typepad (blog sw) -- wrong syntax on their class names??

          Jukka K. Korpela wrote:
          Scripsit maya:
          >
          > <div class="module-typelist module">
          >>
          >as far as I know this is wrong syntax for a class-name, right (with an
          >empty space in the middle of it)????
          >
          No, it's correct syntax for a list of class names, with a space as
          separator. The <divelement belongs to the two classes. This is well
          supported by browsers. (Very few people use browsers like Netscape 4
          which didn't get it.)
          >
          ok, so can I do

          .module-typelist, .module { ... }

          asking b/c am doing like this but it's not working..

          thank you..

          Comment

          • dorayme

            #6
            Re: typepad (blog sw) -- wrong syntax on their class names??

            In article <OeQPi.236823$v 36.124486@reade r1.news.saunala hti.fi>,
            "Jukka K. Korpela" <jkorpela@cs.tu t.fiwrote:
            why use two different classes for one element?
            >
            Well, it's like saying "he is a male engineer", i.e. he belongs to the class
            of engineers and to the class of male people.
            Yes, rather than that he is a male-engineer in the sense that
            this is a class different to female-engineers, the odd male or
            odd female possibly being in an unexpected one of these
            categories.

            Some farsighted universities have separate courses for males and
            females, recognising the great differences in their brains. Just
            to take one facet by way of illustration, men tend to over
            simplify their control systems:

            <http://members.optusho me.com.au/droovies/pics/engineer.jpg>

            Rather logical, really. You
            might want style an element both by the rules for one class and by the rules
            for another class. Say, you make all engineers red and all male people huge
            (in font). Then male engineers will look huge and red, whereas other
            engineers just look red and other males just huge.
            --
            dorayme

            Comment

            • dorayme

              #7
              Re: typepad (blog sw) -- wrong syntax on their class names??

              In article
              <doraymeRidTh is-5665FD.09435513 102007@news-vip.optusnet.co m.au>,
              dorayme <doraymeRidThis @optusnet.com.a uwrote:
              In article <feokde$irf$1@a ioe.org>, maya <maya778899@yah oo.com>
              wrote:
              ok, so can I do

              .module-typelist, .module { ... }

              asking b/c am doing like this but it's not working..
              I meant to mention that if somehow you are trying this css
              inline, it will not work, these combined css instructions are for
              css sheets either external or in the head (see urls I exampled in
              last post).

              If you want it to "work" via inline, you just style directly:



              The truth is that it can get complicated. Maybe these urls will
              inform you a bit anyway?

              --
              dorayme

              Comment

              Working...