471,594 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,594 software developers and data experts.

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...

Oct 12 '07 #1
6 1638
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")
http://www.cs.tut.fi/~jkorpela/

Oct 12 '07 #2
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....
Oct 12 '07 #3
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")
http://www.cs.tut.fi/~jkorpela/

Oct 12 '07 #4
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..
Oct 12 '07 #5
In article <Oe*********************@reader1.news.saunalahti.f i>,
"Jukka K. Korpela" <jk******@cs.tut.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.optushome.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
Oct 12 '07 #6
In article
<do**********************************@news-vip.optusnet.com.au>,
dorayme <do************@optusnet.com.auwrote:
In article <fe**********@aioe.org>, maya <ma********@yahoo.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:

http://netweaver.com.au/test/combine...Combined4.html

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

--
dorayme
Oct 13 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

699 posts views Thread by mike420 | last post: by
37 posts views Thread by Bengt Richter | last post: by
8 posts views Thread by Jan van Veldhuizen | last post: by
8 posts views Thread by Rich Grise | last post: by
267 posts views Thread by Xah Lee | last post: by
2 posts views Thread by JJA | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.