no of ID's in CSS

M

mark | r

ive been told by a colleague that you can only have a finite number of ID's
in a CSS page

anyone got any information on this?

Mark
 
M

Marc Bradshaw

mark said:
ive been told by a colleague that you can only have a finite number of ID's
in a CSS page

anyone got any information on this?

Each ID can only be used one, if that's what you mean?

Marc
 
S

Steve Pugh

mark | r said:
ive been told by a colleague that you can only have a finite number of ID's
in a CSS page

What's a CSS page?
anyone got any information on this?

An HTML document can only have a finite number of IDs because each
element can only have a single ID, so unless you have an infinite
number of elements...

Your colleague is either alluding to the fact that each ID can only be
used once in each HTML document, or he's mistaken.

Steve
 
T

Toby Inkster

mark said:
ive been told by a colleague that you can only have a finite number of
ID's in a CSS page

Well, it's impossible to have an infinite amount, as you would run out of
disk space. Thus you must have a finite amount, but that amount is only
limited by disk space, bandwidth and a desire for not causing browsers to
b0rk.
 
D

dorayme

From: "mark | r said:
ive been told by a colleague that you can only have a finite number of ID's
in a CSS page

anyone got any information on this?

Mark

As I understand it, you can have many distinct ones in a css sheet but can
only use each id once per web page. Thus you can have many IDs per web page
as long as each is different. This is different to classes where you can
have many classes in the css and each class can be employed more than once
on a web page.

Imagine it like this: when you have a css sheet and are using IDs for an
html page, soon as you use an id, the reference on the css page disappears
until you have finished the html page. When you are next working on another
page the reference reappears and is again available. Classes on the other
hand in the css are like magic puddings, you can use them as many times and
they never disappear...

I don't like IDs. There is something too precious about them. In Witness,
Rachel, the Amish woman who is to fall in love with John Book, the big city
detective, (played by Harrison Ford), there is a scene where it is explained
that if he had buttons on his coat, it would not be "plain" enough, it would
be haughty, too proud... In a remake of this perfect film, to give it an
html/css theme, the buttons would be replaced by talk about IDs and classes.

I must go and take my medicine now.

dorayme
 
A

Adrienne

ive been told by a colleague that you can only have a finite number of
ID's in a CSS page

anyone got any information on this?

Mark

An id is a unique identifier for an element, a class sets the
classification of an element. Classifications can have many members, but
unique identifiers can only have one. Make sense so far? This is how I
use them:

<div id="menu" class="noprint">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div>
<div id="content">
<h1>Title of Page</h1>
<p>Some information...</p>
</div>
<div id="footer" class="noprint">
Copyright info
</div>

My CSS might look something like:
#menu {border:1px solid #000; width:20%;float:left}
#content {margin-left:21%; padding:1em;}
#footer {clear:both; font-size:90%; text-align:center; margin-top:5em}
@media print {
..noprint {display:none}
}

Notice that the menu and footer divs both have an individual id, and they
both have the same class. So, when the external stylesheet is loaded, all
pages that have the menu id will have a black border, and any element that
has a class of noprint will not print.
 
M

mbstevens

Toby said:
mark | r wrote:




Well, it's impossible to have an infinite amount, as you would run out of
disk space. Thus you must have a finite amount, ..........
Time to re-impliment the CSS parser to use streams? ;)
 
L

Leif K-Brooks

mbstevens said:
Time to re-impliment the CSS parser to use streams? ;)

An arbitrary number can be used with streams, but an infinite number can
not be used. You may be able to use 10**googolplex IDs, but that's still
finite.
 
M

mbstevens

Leif said:
An arbitrary number can be used with streams, but an infinite number can
not be used. You may be able to use 10**googolplex IDs, but that's still
finite.


Integers are known to be infinite because we understand how any
arbetrary integer can be generated from the previous one.

We also understand how to do this with members of streams, as streams
are theoretically concieved. Time, computer resources, and doggedness
have nothing to do with it. ;)
 
M

mbstevens

mbstevens said:
Integers are known to be infinite because we understand how any
arbetrary integer can be generated from the previous one.

We also understand how to do this with members of streams, as streams
are theoretically concieved. Time, computer resources, and doggedness
have nothing to do with it. ;)

Or, more precisely, a stream is just a sequence of data objects.
We understand how to _process_ a particular data object based on
some of the previous data objects.
 
L

Leif K-Brooks

mbstevens said:
Or, more precisely, a stream is just a sequence of data objects.
We understand how to _process_ a particular data object based on
some of the previous data objects.

Right, but a stream--even one which will always have the potential to
generate infinitely more data objects--will never reach a point where it
has already generated an infinite number of objects. Therefor, while a
document may have the potential to contain an infinite number of IDs, it
will always contain a finite number.
 
R

rf

Leif said:
Right, but a stream--even one which will always have the potential to
generate infinitely more data objects--will never reach a point where it
has already generated an infinite number of objects. Therefor, while a
document may have the potential to contain an infinite number of IDs, it
will always contain a finite number.

Do you fully understand the concept of infinity?

(This is not intended to be a dig at you, most people do not understand the
full mathemical concept of infinity. At University (when I was there, at
least) its treatment was defered till at least the 200 level, and the
higher level at that. I did a full semester unit on "transfinite
arithmetic". Definitely not maths 101)

The stream *will* contain an infinite number of objects. After infinite time
has elapsed.

It will then contain aleph0 objects, aleph0 being the number of counting
numbers (1,2,3...).

In effect the word "never" becomes null and void at eternity so your
statement becomes
"... will <null/> reach a point where ...".

Recall the words of the Bairds "Hamlet", typewriters, and an infinite number
of monkeys :)

Back on topic, a web page *can* have an infinite number of ID's, but only if
it is infinitely long. This does not worry us though since we have infinite
time available to scroll our viewport down said page.

In *our* real world, of course, everything is finite, unless of course you
can deliver that that web page with infinite bandwidth and have an infinite
viewport with which to view it :)

Cheers
Richard.
 
M

mbstevens

Leif said:
Right, but a stream--even one which will always have the potential to
generate infinitely more data objects--will never reach a point where it
has already generated an infinite number of objects. Therefor, while a
document may have the potential to contain an infinite number of IDs, it
will always contain a finite number.

Assume, for example, a 1:1 mapping between members of the stream and
data objects generated from the stream. If the stream is infinite, the
generated data objects are infinite.

It's the same way we can generate the sequences:

Original sequence: 2 4 6 8 ............
Derived sequence: 3 5 7 9 ..............

You wouldn't claim that the derived sequence is finite, would you?

There is a vast difference between mathmatical infinity and physical
possibilities.
 
M

mbstevens

rf said:
Leif K-Brooks wrote:




Do you fully understand the concept of infinity?

(This is not intended to be a dig at you, most people do not understand the
full mathemical concept of infinity. At University (when I was there, at
least) its treatment was defered till at least the 200 level, and the
higher level at that. I did a full semester unit on "transfinite
arithmetic". Definitely not maths 101)

The stream *will* contain an infinite number of objects. After infinite time
has elapsed.

We don't even need to think of it temporally. For instance, there _are_
infinite integers. If we specify a sequence derived from the sequence
of integers, then we have simply specified the sequence. It might be
either denumerable or uncountable, as shown by Cantor's diagonal
argument, but it still is, and it is infinite.
 
R

rf

mbstevens wrote:
rf said:
We don't even need to think of it temporally. For instance, there _are_
infinite integers. If we specify a sequence derived from the sequence
of integers, then we have simply specified the sequence. It might be
either denumerable or uncountable, as shown by Cantor's diagonal
argument, but it still is, and it is infinite.

Are you talking about the physical object (the "stream") or our use of it
("streaming" it)?

Your statement above is true for the <noun>stream</noun> object, the thing
you can point at on your [infinite] disk drive, the infinite CSS or, say,
MPEG file.

However the *verb* stream, as in "streaming the CSS file", does introduces
time. That is what streaming means, stream (and play) it in real time. Your
words: "re-implement the CSS parser to use streams" imply the time domain. I
assumed you to mean with your original statement that we can not transport
an infinite file and parse it all at once so lets stream it into the CSS
parser, over time.

Suddenly in there somewhere however you canged from the verb stream to the
noun stream.

To be able to <verb>stream</verb> the object we need infinite time, unless
we have infinite bandwidth to hand.

To play an infinite MPEG requires infinite time, unless we play it at an
infinite number of frames per second (once again, with infinite bandwidth)
and then we can of course choose whatever time span we like for the
"duration" of that MPEG :)

All of this is making my brain hurt. Thank &deity it's now the cocktail hour
and I can feed it a beer :)

Cheers
Richard.
 
M

mbstevens

rf said:
mbstevens wrote:
rf wrote:




Are you talking about the physical object (the "stream") or our use of it
("streaming" it)?

Neither. I am talking about it as a mathmatical (or at least logical)
construct -- noting to do with physical reality at all. If
we can properly specify how the stream's members are to be processed,
then the stream of derived objects has quite simply been specified.

However the *verb* stream, as in "streaming the CSS file", does introduces
time. That is what streaming means, stream (and play) it in real time.

I would say that it introduces the concept of sequence, but
does not _necessarily_ bring in the concept of time.
Your
words: "re-implement the CSS parser to use streams" imply the time domain.

A parser could be using a stream that _is_
infinite (in the mathmatical or logical sense).
For instance, it could be processing the set of
integers.

That the parser couldn't _actually_ do the
entire process physically was the joke.
You did catch the smiley?

Where anything mathmatically, logically,
or set theoreticaly infinite is concerned, we can
specify. Once specified clearly, the thing we specified
_is_. Just not in a physical sense.
 
M

mbstevens

mbstevens said:
Where anything mathmatically, logically,
or set theoreticaly infinite is concerned, we can
specify. Once specified clearly, the thing we specified
_is_. Just not in a physical sense.

W.V.O. Quine also had a sterling version. "To be is to be the value
of a bound variable."
 
D

dorayme

From: mbstevens said:
Once specified clearly, the thing we specified
_is_. Just not in a physical sense.

I don't think existence has different senses. If a and b exist, then they
exist in exactly the same sense. It is tempting to suppose that a cup of
coffee can exist in a physical sense whereas a ghost or god or number or
class can exist in a non-physical sense, but this is not so. Things either
exists or they don't. If the cup exists then it is certainly a physical
object. If it was not a physical object, it would not exist. It would not
exist in a non-physical way. This is not because non-physical objects can't
exist (numbers may well do so). The fundamental reason for all this is that
there are no *ways* in which things exist. They either exist or they don't.
The existence itself is pure and has no qualities.

By the way - because this would really be getting too far off the OP's
original question and I am a firm believer in sticking to topic - this is
partly why God does not exist ...

dorayme
 
M

mbstevens

dorayme said:
I don't think existence has different senses. If a and b exist, then they
exist in exactly the same sense.

Some have given up arguing about 'existence' altogether because the word
has been beaten to death during the last 200 years. If you look back
through the thread you'll notice I never used it once. I was using
"is". That was more than semantic sugaring -- it is a word less closely
tied to ontology/metaphysics. But I probably should have said
"it just doesn't have any physicality" instead of "is... Just not in a
physical sense."
It is tempting to suppose that a cup of
coffee can exist in a physical sense whereas a ghost or god or number or
class can exist in a non-physical sense, but this is not so. Things either
exists or they don't.

You're definitely leaning toward Quine's camp.
"To be is to be the value of a bound variable."
These waters are too muddy to be thrashed out here.
But have a look at the old analytic/synthetic distinction
just to be sure you agree with yourself:
http://www.mbstevens.com/hume/index.html#ideafact
............
By the way - because this would really be getting too far off the OP's
original question and I am a firm believer in sticking to topic - this is
partly why God does not exist ...

What?
Your wetware is missing the slavery-circuit?
;)
 
D

dorayme

From: mbstevens said:
Some have given up arguing about 'existence' altogether because the word
has been beaten to death during the last 200 years. If you look back
through the thread you'll notice I never used it once. I was using
"is". That was more than semantic sugaring -- it is a word less closely
tied to ontology/metaphysics. But I probably should have said
"it just doesn't have any physicality" instead of "is... Just not in a
physical sense."
You have done no wrong. I don't think anything is changed by avoiding the
word "existence". Very similar problems come up whatever words are used. I
don't really object to your saying "... not in a physical sense". It just
seemed a convenient moment to make a speech.
You're definitely leaning toward Quine's camp.
"To be is to be the value of a bound variable."
These waters are too muddy to be thrashed out here.
But have a look at the old analytic/synthetic distinction
just to be sure you agree with yourself:
http://www.mbstevens.com/hume/index.html#ideafact
I have always had this condition of agreeing with myself. But I am
interested in anything that might shake me out of it. I will take a peek at
your site ...
What?
Your wetware is missing the slavery-circuit?
;)
Well, I did go a little far here! There is a particularly Catholic argument
for the existence of god that depends on treating existence as a property or
quality. It is perhaps one of the strongest of the ancient arguments
unassailable by scientific advances. But it stumbles badly on critical
analysis of the idea of what it is for something to be. Forget about this
particular aspect. I withdraw it. I will ask a neurosurgeon friend about my
circuitry, see if anything can be done ...

dorayme
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top