no of ID's in CSS

Discussion in 'HTML' started by mark | r, Jul 4, 2005.

  1. mark | r

    mark | r Guest

    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
     
    mark | r, Jul 4, 2005
    #1
    1. Advertising

  2. mark | r wrote:
    > 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
     
    Marc Bradshaw, Jul 4, 2005
    #2
    1. Advertising

  3. mark | r

    Steve Pugh Guest

    "mark | r" <> wrote:

    >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

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Jul 4, 2005
    #3
  4. mark | r

    Toby Inkster Guest

    mark | r wrote:

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

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Jul 4, 2005
    #4
  5. mark | r

    dorayme Guest

    > From: "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
    >


    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
     
    dorayme, Jul 5, 2005
    #5
  6. mark | r

    Adrienne Guest

    Gazing into my crystal ball I observed "mark | r"
    <> writing in
    news:42c9663e$0$12912$:

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

    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne, Jul 5, 2005
    #6
  7. mark | r

    mbstevens Guest

    Toby Inkster wrote:
    > mark | r wrote:
    >
    >
    >>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, ..........
    >

    Time to re-impliment the CSS parser to use streams? ;)
    --
    mbstevens http://www.mbstevens.com/
     
    mbstevens, Jul 5, 2005
    #7
  8. mbstevens wrote:
    > Toby Inkster 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? ;)


    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.
     
    Leif K-Brooks, Jul 6, 2005
    #8
  9. mark | r

    mbstevens Guest

    Leif K-Brooks wrote:
    > mbstevens wrote:
    >
    >>Toby Inkster 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? ;)

    >
    >
    > 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. ;)
    --
    mbstevens
    http://www.mbstevens.com/cgi/mkatt.pl?name=coding/glue
     
    mbstevens, Jul 6, 2005
    #9
  10. mark | r

    mbstevens Guest

    mbstevens wrote:
    > Leif K-Brooks wrote:
    >
    >> mbstevens wrote:
    >>
    >>> Toby Inkster 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? ;)

    >>
    >>
    >>
    >> 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. ;)


    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.
     
    mbstevens, Jul 6, 2005
    #10
  11. mbstevens wrote:
    > mbstevens wrote:
    >
    >> Leif K-Brooks wrote:
    >>
    >>> 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. ;)

    >
    > 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.
     
    Leif K-Brooks, Jul 6, 2005
    #11
  12. mark | r

    rf Guest

    Leif K-Brooks wrote:

    > 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.
     
    rf, Jul 6, 2005
    #12
  13. mark | r

    mbstevens Guest

    Leif K-Brooks wrote:
    > mbstevens wrote:
    >
    >>mbstevens wrote:
    >>
    >>
    >>>Leif K-Brooks wrote:
    >>>
    >>>
    >>>>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. ;)

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


    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.
     
    mbstevens, Jul 6, 2005
    #13
  14. mark | r

    mbstevens Guest

    rf wrote:
    > Leif K-Brooks wrote:
    >
    >
    >>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.


    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.
     
    mbstevens, Jul 6, 2005
    #14
  15. mark | r

    rf Guest

    mbstevens wrote:
    rf wrote:

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


    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.
     
    rf, Jul 6, 2005
    #15
  16. mark | r

    mbstevens Guest

    rf wrote:
    > mbstevens wrote:
    > rf wrote:
    >
    >
    >>>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.

    >
    >
    > 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.
     
    mbstevens, Jul 6, 2005
    #16
  17. mark | r

    mbstevens Guest

    mbstevens wrote:

    > 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."
     
    mbstevens, Jul 6, 2005
    #17
  18. mark | r

    dorayme Guest

    > From: mbstevens <>
    >
    > 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
     
    dorayme, Jul 7, 2005
    #18
  19. mark | r

    mbstevens Guest

    dorayme wrote:
    >>From: mbstevens <>
    >>
    >>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.


    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?
    ;)
     
    mbstevens, Jul 7, 2005
    #19
  20. mark | r

    dorayme Guest

    > From: mbstevens <>
    >
    > dorayme wrote:
    >>> From: mbstevens <>
    >>>
    >>> 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.

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

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

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

    >> 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?
    > ;)


    >

    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
     
    dorayme, Jul 7, 2005
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric
    Replies:
    4
    Views:
    734
    clintonG
    Dec 24, 2004
  2. tom watson

    print.css and screen.css

    tom watson, Sep 9, 2003, in forum: HTML
    Replies:
    1
    Views:
    472
    Jukka K. Korpela
    Sep 9, 2003
  3. Joshua Beall
    Replies:
    1
    Views:
    438
    Bertilo Wennergren
    Dec 10, 2003
  4. Noozer
    Replies:
    10
    Views:
    2,108
    Mitja
    Oct 13, 2004
  5. Titus A Ducksass - AKA broken-record
    Replies:
    6
    Views:
    655
    Titus A Ducksass - AKA broken-record
    Nov 15, 2004
Loading...

Share This Page