Re: urgent CSS question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22/5/09 13:27, PJ wrote:
Ok, I have duplicate classes - #frame and #frame1.

Let's get our terminology straight:

ids are not classes; classes are not ids.

ids look like:

id="thing"

and are selected like:

#thing

classes look like:

class="thing other-thing"

and are selected like

.thing

An element may have zero or one IDs.

An element may have zero or more classes.

id is supposed to be unique within a given document.

The same classname may be used multiple times in the same document.

See:

http://css.maxdesign.com.au/selectutorial/advanced_idclass.htm

What I don't understand is why switching from #frame to #frame1 should
change formatting.

#frame targets an element with id="frame" while "frame1" targets an element with id="frame1". So I'm not sure what these have to do with one another.

The two classes are absolutely the same, the only
difference is the "1" in the name.

Which is to say they are utterly different, since they have different names.

I would logically assume that the
interpreter or whoever is operating this stuff would understand that the
page is using a different class, whether it is the same name as another
or not.

I'm sorry, I don't know what you mean.

If I create still another class and start to format the various
sections of that class, I will wind up with the identical class as
#frame1.

Again, I don't know what you mean.

So where is the logic here?

Without seeing some clear test case links that reproduces the problem for us, I really can't comment about that.

It seems to me that what I am trying to do is logically and intuitively clear
> and simple.

What you're trying to do really isn't clear to me. Being able to see the problem (and the underlying code) might help.

--
Benjamin Hawkes-Lewis

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux