This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > October 2007 > typepad (blog sw) -- wrong syntax on their class names??
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
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 2007-10-12, 6:16 pm |
| 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 <div> element 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/
| |
|
| Jukka K. Korpela wrote:
> Scripsit maya:
>
>
> No, it's correct syntax for a list of class names, with a space as
> separator. The <div> element 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....
| |
| Jukka K. Korpela 2007-10-12, 6:16 pm |
| Scripsit maya:
- -[color=darkred]
> 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/
| |
|
| Jukka K. Korpela wrote:
> Scripsit maya:
>
>
> No, it's correct syntax for a list of class names, with a space as
> separator. The <div> element 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..
| |
| dorayme 2007-10-12, 10:15 pm |
| In article <OeQPi.236823$v36.124486@reader1.news.saunalahti.fi>,
"Jukka K. Korpela" <jkorpela@cs.tut.fi> wrote:
>
> 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/dro...cs/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
| |
| dorayme 2007-10-12, 10:15 pm |
| In article <feokde$irf$1@aioe.org>, maya <maya778899@yahoo.com>
wrote:
> Jukka K. Korpela wrote:
>
> ok, so can I do
>
> .module-typelist, .module { ... }
>
> asking b/c am doing like this but it's not working..
>
> thank you..
What do you mean, it does not work? URL? Perhaps your browser
does not like the combined ".module-typelist, .module { ... }"
Try simply just one of them:
..module { ... }
The two together in fact add nothing in the situation where you
are specifying a property that is not contradicted by the cascade
rules (often by an instruction lower down in the css sheet)
You may find these helpful to look at the following examples,
notice there is no difference in many circumstances between the
first two but you need to be careful about what else is in a
stylesheet and where, touched upon in 3:
http://netweaver.com.au/test/combin...sCombined1.html
http://netweaver.com.au/test/combin...sCombined2.html
http://netweaver.com.au/test/combin...sCombined3.html
--
dorayme
| |
| dorayme 2007-10-12, 10:15 pm |
| In article
<doraymeRidThis-5665FD.09435513102007@news-vip.optusnet.com.au>,
dorayme <doraymeRidThis@optusnet.com.au> wrote:
> In article <feokde$irf$1@aioe.org>, maya <maya778899@yahoo.com>
> wrote:
[color=darkred]
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/combin...sCombined4.html
The truth is that it can get complicated. Maybe these urls will
inform you a bit anyway?
--
dorayme
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|