Re: urgent CSS question

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

 



Benjamin Hawkes-Lewis wrote:
> 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.
>
They may have different names, but does that change their functionality?
They are identical except for the "1" in the title of the id. So, if I
change the one id to the other in the same code, I don't understand why
the formatting would change? Obviously, the parents and the children
have not changed unless there's some weird hanky-panky going on.
The simple reason to change the id is to avoid messing up the appearance
of other pages that are using the same css file. Or do I have to make a
new css file for every page; that would be a little ridiculous, wouldn't
it? And to follow the logic here, if I create a different id and in the
end it turns out to be identical to the original "frame" except for the
name, shouldn't it function the same.
There is no need to see sample code because the code does not change THE
ONLY THING THAT IS CHANGED IS THE ID NAME ! and, I mean only the name...
the only plausible explanation would be the change within the css file
and that implies that there is something funny going on within that
file. Or are there unseen elements being kept "alive" when there is a
change in the nomenclature of the id?
Or does the browser keep things in memory or are the memory modules
having neuron crises?
As I have stated before, this is the kind of thing that drives one crazy
trying to understand the un-understandable.
>> 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
>


-- 
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-------------------------------------------------------------
Phil Jourdan --- pj@xxxxxxxxxxxxx
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


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