473,322 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 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 1714
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
37
by: Bengt Richter | last post by:
ISTM that @limited_expression_producing_function @another def func(): pass is syntactic sugar for creating a hidden list of functions. (Using '|' in place of '@' doesn't change the picture...
8
by: Jan van Veldhuizen | last post by:
The UPDATE table FROM syntax is not supported by Oracle. I am looking for a syntax that is understood by both Oracle and SqlServer. Example: Table1: id name city ...
8
by: Rich Grise | last post by:
I think I've finally found a tutorial that can get me started: http://www.zib.de/Visual/people/mueller/Course/Tutorial/tutorial.html and I've been lurking for awhile as well. What happened is,...
8
by: tom | last post by:
I am new to SQL administration. >From a list of IDs that are the primary key in one table (i.e. Customer Table), I want to make changes in tables that use those IDs as a foreign key. ...
267
by: Xah Lee | last post by:
Python, Lambda, and Guido van Rossum Xah Lee, 2006-05-05 In this post, i'd like to deconstruct one of Guido's recent blog about lambda in Python. In Guido's blog written in 2006-02-10 at...
18
by: bsruth | last post by:
I tried for an hour to find some reference to concrete information on why this particular inheritance implementation is a bad idea, but couldn't. So I'm sorry if this has been answered before....
2
by: JJA | last post by:
I'm looking at some code I do not understand: var icons = new Array(); icons = new GIcon(); icons.image = "somefilename.png"; I read this as an array of icons is being built. An element of...
1
by: judacris | last post by:
I've seen the threads here about molding 2 divs in a centered fashion. but I can't seem to solve this thing. my blogger blog is functioning well on my site for now, but the blog feed (left) and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.