Table cells

Discussion in 'HTML' started by Brian Robertson, Jun 26, 2007.

  1. I am doing something wrong on a style sheet. I want some space before
    the text in the cells of a table, so I used this:

    td {
    height:19px;
    background-color: rgb(248,239,182);
    margin-left: 3;
    }

    When viewed in my editor the spaces are there as desired, but once
    viewed with a browser they are gone.

    Help!

    Brian.
    Brian Robertson, Jun 26, 2007
    #1
    1. Advertising

  2. Brian Robertson wrote:
    > I am doing something wrong on a style sheet. I want some space before
    > the text in the cells of a table, so I used this:
    >
    > td {
    > height:19px;
    > background-color: rgb(248,239,182);
    > margin-left: 3;
    > }
    >
    > When viewed in my editor the spaces are there as desired, but once
    > viewed with a browser they are gone.
    >


    Margin is outside the element padding is inside the element, therefore
    if your want to add space to the text *inside* the TD then the property
    for the TD should be padding. Also your must use *units* for almost all
    length properties "margin-left: 3;" is invalid, best to use units
    proportional with respect to the font

    td { height: 1.5em; padding-left: .25em; }

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jun 26, 2007
    #2
    1. Advertising

  3. Brian Robertson

    Bergamot Guest

    Brian Robertson wrote:
    >
    > td {
    > margin-left: 3;
    > }


    3 what? Hobnobs? Non-zero length values require a unit: em, px, %, etc.

    BTW, margins on a table cell may give odd results in some browsers. Use
    padding instead.

    --
    Berg
    Bergamot, Jun 26, 2007
    #3
  4. Bergamot wrote:
    > Brian Robertson wrote:
    >> td {
    >> margin-left: 3;
    >> }

    >
    > 3 what? Hobnobs? Non-zero length values require a unit: em, px, %, etc.
    >
    > BTW, margins on a table cell may give odd results in some browsers. Use
    > padding instead.
    >


    Comes from using Frontpage!

    Brian.
    Brian Robertson, Jun 26, 2007
    #4
  5. Jonathan N. Little wrote:
    > Brian Robertson wrote:
    >> I am doing something wrong on a style sheet. I want some space before
    >> the text in the cells of a table, so I used this:
    >>
    >> td {
    >> height:19px;
    >> background-color: rgb(248,239,182);
    >> margin-left: 3;
    >> }
    >>
    >> When viewed in my editor the spaces are there as desired, but once
    >> viewed with a browser they are gone.
    >>

    >
    > Margin is outside the element padding is inside the element, therefore
    > if your want to add space to the text *inside* the TD then the property
    > for the TD should be padding. Also your must use *units* for almost all
    > length properties "margin-left: 3;" is invalid, best to use units
    > proportional with respect to the font
    >
    > td { height: 1.5em; padding-left: .25em; }
    >


    Thanks!
    Brian Robertson, Jun 26, 2007
    #5
  6. Brian Robertson

    dorayme Guest

    In article <>,
    Bergamot <> wrote:

    > Non-zero length values require a unit: em, px, %, etc.


    This is right.

    However, there is a small implication here that it is quite ok
    not to use them for zero lengths. Technically this is correct.
    However, there is an issue of some gravity here.

    Jean-Paul Sartre was sitting at a French cafe, revising his draft
    of Being and Nothingness. He said to the waitress, "I'd like a
    cup of coffee, please, with no cream." The waitress replied, "I'm
    sorry, monsieur, but we're out of cream. How about with no milk?"

    Now surely, if a cup of coffee without milk is different to a cup
    of coffee without cream, then a length without any pixels is
    different to a length without any em width. So those with a
    particular interest in great clarity in their css might be wise
    to use units for zero lengths too. It will do no harm and it will
    communicate more precisely with those who read css sheets.

    --
    dorayme
    dorayme, Jun 27, 2007
    #6
  7. Brian Robertson

    Neredbojias Guest

    On Tue, 26 Jun 2007 23:01:16 GMT dorayme scribed:

    > In article <>,
    > Bergamot <> wrote:
    >
    >> Non-zero length values require a unit: em, px, %, etc.

    >
    > This is right.
    >
    > However, there is a small implication here that it is quite ok
    > not to use them for zero lengths. Technically this is correct.
    > However, there is an issue of some gravity here.
    >
    > Jean-Paul Sartre was sitting at a French cafe, revising his draft
    > of Being and Nothingness. He said to the waitress, "I'd like a
    > cup of coffee, please, with no cream." The waitress replied, "I'm
    > sorry, monsieur, but we're out of cream. How about with no milk?"
    >
    > Now surely, if a cup of coffee without milk is different to a cup
    > of coffee without cream, then a length without any pixels is
    > different to a length without any em width. So those with a
    > particular interest in great clarity in their css might be wise
    > to use units for zero lengths too. It will do no harm and it will
    > communicate more precisely with those who read css sheets.


    Actually, the question should be "Is nothing equal to 0?" and the answer
    is "No."

    Example:

    Cookies left in the jar=0
    Cookies left in the jar=

    Are the above two lines meaningfully the same?

    According to (most) scientists, the universe started from a singularity.
    Hypothetically, this singularity was nothing (or 0 if your prefer) but
    had the theoretical *potential* to be something. Furthermore, the name
    "singularity" in this context definitely does not relate to "1" because,
    as I have proven elsewhere, you cannot have just 1 exclusively in a
    totality unless you consider a possible all-encompassing totality as "The
    Totality", i.e. 1, and the only thing in existence forevermore.

    Now the next question is "How can you have 'nothing with potential?'"
    Isn't that very potential something in its own right? The answer is that
    you cannot have "nothing with potential" because potential implies the
    existence of time, which, of course, would be not nothing. Ergo, the
    "potential theory" is nothing.

    Unfortunately, this brings us back to the nothing vs. zero problem. If
    zero has no potential, does it not equate to nothing? The only logical
    solution is that 0 does, indeed, imply something in addition to itself
    (as opposed to "nothing") but which can be defined exclusively by numbers
    or other tangible contrivances irrational in scope.

    In conclusion, all this goes to prove that religion is inconsummate,
    God's existence is inconceivable, and putting units after 0 quantities in
    css is an exercise in futility. However, dues to flaws beyond the
    markupists' control, it realistically is sometimes not.

    --
    Neredbojias

    Once I had a little bird
    That made me rather hasty.
    So now I have no little bird,
    But it was very tasty.
    Neredbojias, Jun 27, 2007
    #7
  8. dorayme wrote:
    > Bergamot <> wrote:
    >
    >> Non-zero length values require a unit: em, px, %, etc.

    >
    > This is right.
    >
    > However, there is a small implication here that it is quite ok
    > not to use them for zero lengths. Technically this is correct.
    > However, there is an issue of some gravity here.


    <snip very interesting allegory about Sartre>

    Also "line-height" doesn't require a length. When the length is missed
    out, it behaves a bit like "em", but not quite.

    For what it's worth, when I'm in early stages of CSS layout, I often set a
    bunch of borders on elements to:

    border: 0px solid magenta;

    (and dotted/dashed lime/cyan/yellow/red/etc).

    Then, with a single search-and-replace I can change 0px to 1.0px to see
    borders around everything. Then search-and-replace back.

    By leaving on the "px" my search-and-replace is able to differentiate
    between these debugging borders, and other, more normal, occurrences of 0
    in my style sheet.

    --
    Toby A Inkster BSc (Hons) ARCS
    [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
    [OS: Linux 2.6.12-12mdksmp, up 6 days, 15:46.]

    The End of an Era
    http://tobyinkster.co.uk/blog/2007/06/26/end-of-an-era/
    Toby A Inkster, Jun 27, 2007
    #8
  9. Toby A Inkster wrote:
    > dorayme wrote:
    >> Bergamot <> wrote:
    >>
    >>> Non-zero length values require a unit: em, px, %, etc.

    >> This is right.
    >>
    >> However, there is a small implication here that it is quite ok
    >> not to use them for zero lengths. Technically this is correct.
    >> However, there is an issue of some gravity here.

    >
    > <snip very interesting allegory about Sartre>
    >
    > Also "line-height" doesn't require a length. When the length is missed
    > out, it behaves a bit like "em", but not quite.
    >
    > For what it's worth, when I'm in early stages of CSS layout, I often set a
    > bunch of borders on elements to:
    >
    > border: 0px solid magenta;
    >
    > (and dotted/dashed lime/cyan/yellow/red/etc).
    >
    > Then, with a single search-and-replace I can change 0px to 1.0px to see
    > borders around everything. Then search-and-replace back.
    >
    > By leaving on the "px" my search-and-replace is able to differentiate
    > between these debugging borders, and other, more normal, occurrences of 0
    > in my style sheet.
    >


    Let me explain where my mistake came from. I am reading a book about CSS
    and slowly learning new things, but these things take time. Meanwhile, I
    wanted to sort the padding problem out. Previously I had highlighted the
    text and put the padding in through Frontpage settings. The code was an
    inline style and it said margin-left: 3. There was no unit shown. From
    this I simply tried to guess the proper rule and then turned to you lot
    for help. It worked but was clumsy, which is why I wanted it out.

    Brian.
    Brian Robertson, Jun 27, 2007
    #9
  10. Brian Robertson

    dorayme Guest

    In article <5n.co.uk>,
    Toby A Inkster <> wrote:

    > For what it's worth, when I'm in early stages of CSS layout, I often set a
    > bunch of borders on elements to:
    >
    > border: 0px solid magenta;


    Me too, one's own private "FF developer type outline elements"
    facility...

    --
    dorayme
    dorayme, Jun 28, 2007
    #10
  11. Gazing into my crystal ball I observed Neredbojias <>
    writing in news:Xns995BC2E7B66C5nanopandaneredbojias@198.186.190.161:

    > Actually, the question should be "Is nothing equal to 0?" and the answer
    > is "No."
    >
    >


    Were you watching Sesame Street this morning? The number of the day was
    Zero (ha ha ha ha) --- Sorry, as a single Mom with a three and a half year
    old ....

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Jun 28, 2007
    #11
  12. Brian Robertson

    Neredbojias Guest

    On Thu, 28 Jun 2007 17:42:05 GMT Adrienne Boswell scribed:

    > Gazing into my crystal ball I observed Neredbojias
    > <> writing in
    > news:Xns995BC2E7B66C5nanopandaneredbojias@198.186.190.161:
    >
    >> Actually, the question should be "Is nothing equal to 0?" and the
    >> answer is "No."
    >>
    >>

    >
    > Were you watching Sesame Street this morning? The number of the day
    > was Zero (ha ha ha ha) --- Sorry, as a single Mom with a three and a
    > half year old ....


    Truthfully, the question of the universal singularity has haunted me for
    years. The notion, simply put, is that it is/was both something and
    nothing outside of time. Now how can anyone in their right mind accept
    that? Ergo, I thought referring to it in the shade of dorayme's sentient
    penumbra might just shed some light on the reality or lack thereof imbued
    within the scope of my nightmare. Juvenile, I admit, but since my second
    childhood has expired, I've entertained nostalgic longings for convoluted
    neuroses.

    --
    Neredbojias

    Once I had a little dog
    Who wagged its tail spritely.
    But it walked by the harvestor
    And now is shorter slightly.
    Neredbojias, Jun 28, 2007
    #12
  13. Brian Robertson

    dorayme Guest

    In article
    <Xns995D86E5FC087nanopandaneredbojias@198.186.190.161>,
    Neredbojias <> wrote:

    > singularity has haunted me for
    > years. The notion, simply put, is that it is/was both something and
    > nothing outside of time. Now how can anyone in their right mind accept
    > that? Ergo, I thought referring to it in the shade of dorayme's sentient
    > penumbra might just shed some light on the reality or lack thereof imbued
    > within the scope of my nightmare.



    I take this as license to speak. Perhaps you are having
    difficulty with the idea of anything being outside of time? With
    some things, it makes no sense for them to be time stamped; for
    example, there is a prime number between 5 and 8 but it can
    hardly have any kind of lifespan. Now, if something has no
    lifespan, it cannot be in time.

    The other difficulty you are having perhaps is the idea of being
    on the edge of something. What really is an edge? I have a Theory
    of Edges but I get this funny feeling that it might be a bit OT
    to expound it here.

    --
    dorayme
    dorayme, Jun 29, 2007
    #13
  14. Brian Robertson

    Neredbojias Guest

    On Thu, 28 Jun 2007 23:18:35 GMT dorayme scribed:

    >> singularity has haunted me for
    >> years. The notion, simply put, is that it is/was both something and
    >> nothing outside of time. Now how can anyone in their right mind
    >> accept that? Ergo, I thought referring to it in the shade of
    >> dorayme's sentient penumbra might just shed some light on the reality
    >> or lack thereof imbued within the scope of my nightmare.

    >
    >
    > I take this as license to speak. Perhaps you are having
    > difficulty with the idea of anything being outside of time?


    Yes, that is true. How can existence itself *be* with no time? I can
    possibly accept timelessness in conjunction with a test-acceptance of The
    Singularity or absolutely nothing at all, but otherwise I see it as
    impossible.

    > With
    > some things, it makes no sense for them to be time stamped; for
    > example, there is a prime number between 5 and 8 but it can
    > hardly have any kind of lifespan.


    Ironically, it is true for all time. It becomes non-true with no time.


    > Now, if something has no
    > lifespan, it cannot be in time.


    I think semantics are getting in the way here. Everything you know,
    imagine, or feel exists within time. Even 2 + 2 = 4 needs "time" to have
    any meaning. Physical laws do not exist outside of time so neither do
    their formulae.

    > The other difficulty you are having perhaps is the idea of being
    > on the edge of something. What really is an edge? I have a Theory
    > of Edges but I get this funny feeling that it might be a bit OT
    > to expound it here.


    Well, an edge can be part of something, as the edge of a precipice. It can
    be a limit in other ways, -the limit of my patience. I suppose it can be
    external to something as well, but what are your thoughts? Don't keep me
    on edge...

    --
    Neredbojias

    Once I had a little dog
    Who wagged its tail spritely.
    But it walked by the harvestor
    And now is shorter slightly.
    Neredbojias, Jun 29, 2007
    #14
  15. Brian Robertson

    dorayme Guest

    In article
    <Xns995DE094E8F2Ananopandaneredbojias@198.186.190.161>,
    Neredbojias <> wrote:

    > > Now, if something has no lifespan, it cannot be in time.

    >
    > Everything you know, imagine, or feel exists within time.


    I was not talking about what you or anyone knows or imagines or
    feels. There are plenty of things that are true that no one
    knows. It just does not make any obvious sense to say about some
    things (I gave an example) that they exist in time.

    Anyway, you know what about time? So why would you be insisting
    that everything exists in it. (Is someone paying you Boji to say
    this?). You might as well say everything exists in bright
    daylight but not otherwise.

    --
    dorayme
    dorayme, Jun 29, 2007
    #15
  16. Brian Robertson

    Neredbojias Guest

    On Fri, 29 Jun 2007 22:09:06 GMT dorayme scribed:

    > In article
    > <Xns995DE094E8F2Ananopandaneredbojias@198.186.190.161>,
    > Neredbojias <> wrote:
    >
    >> > Now, if something has no lifespan, it cannot be in time.

    >>
    >> Everything you know, imagine, or feel exists within time.

    >
    > I was not talking about what you or anyone knows or imagines or
    > feels. There are plenty of things that are true that no one
    > knows. It just does not make any obvious sense to say about some
    > things (I gave an example) that they exist in time.
    >
    > Anyway, you know what about time? So why would you be insisting
    > that everything exists in it. (Is someone paying you Boji to say
    > this?). You might as well say everything exists in bright
    > daylight but not otherwise.


    According to (most) scientists, time did not exist until after the start
    of the Big Bang. Ergo, the Banger itself had to exist outside of time
    prior to that. This prodigious Banger has been proposed to be a
    singularity, but what is the grist of that? Anyway, it would seem the
    brainiacs agree with you, although whether you can actually have
    something prior to the start of time is an interesting dilemma.

    I believe that time is just a euphemism for motion and "prior to" the Big
    Bang there was no motion. Now physical reality requires motion; atoms
    pulse with "life" and could not exist completely static. Neither could
    their constituents in all probability. Therefore, there would *be* no
    reality prior to the BB, and this is something almost everyone agrees
    with. Of course, I'm speaking of reality as we know it; perhaps there
    was God at first after all. A simple musing of faith doesn't solve the
    problem rationally, however, because nothing tangible (-including prime
    numbers) would exist in a homogeneous, non-cognible environment.

    Basically what we have is something springing from nothing. In other
    words, before there was something, there was nothing. But it couldn't
    have been quite nothing because something somehow, somewhen came from it.
    Even an empty container is something. So your insistence that some thing
    (s) exist(s) outside of time may very well be true, but whatever it
    is/was is (so far, at least) unfathomable from a deductive point of view.
    Based on this knowledge, my belief is that if you have just 1 of
    something in the absolute (-meaning in a universe with nothing else,) you
    may as well have nothing because, based on what we know, there is no
    difference. To put it another way, 1 = 0.

    --
    Neredbojias

    Once I had a little dog
    Who wagged its tail spritely.
    But it walked by the harvestor
    And now is shorter slightly.
    Neredbojias, Jun 30, 2007
    #16
  17. Brian Robertson

    dorayme Guest

    In article
    <Xns995F17CDF4D72nanopandaneredbojias@198.186.190.161>,
    Neredbojias <> wrote:

    > On Fri, 29 Jun 2007 22:09:06 GMT dorayme scribed:
    >
    > > In article
    > > <Xns995DE094E8F2Ananopandaneredbojias@198.186.190.161>,
    > > Neredbojias <> wrote:
    > >
    > >> > Now, if something has no lifespan, it cannot be in time.
    > >>
    > >> Everything you know, imagine, or feel exists within time.

    > >
    > > I was not talking about what you or anyone knows or imagines or
    > > feels. There are plenty of things that are true that no one
    > > knows. It just does not make any obvious sense to say about some
    > > things (I gave an example) that they exist in time.
    > >
    > > Anyway, you know what about time? So why would you be insisting
    > > that everything exists in it. (Is someone paying you Boji to say
    > > this?). You might as well say everything exists in bright
    > > daylight but not otherwise.

    >
    > According to (most) scientists, time did not exist until after the start
    > of the Big Bang. Ergo, the Banger itself had to exist outside of time
    > prior to that.


    This is mistake of yours does not even have a Latin name. I will
    have to adapt a phrase of my papa: it is a confusion of the first
    waters.

    If time begins at the start of the BB, there is prior about it.
    Please stop thinking about these things, they can cause brain
    damage in the wrong heads.

    --
    dorayme
    dorayme, Jun 30, 2007
    #17
  18. Brian Robertson

    dorayme Guest

    In article
    <>,
    dorayme <> wrote:

    > This is mistake of yours does not even have a Latin name. I will
    > have to adapt a phrase of my papa: it is a confusion of the first
    > waters.
    >
    > If time begins at the start of the BB, there is prior about it.
    > Please stop thinking about these things, they can cause brain
    > damage in the wrong heads.


    My God, I only had one glass of wine with dinner tonight!

    This mistake of yours does not even have a Latin name. I will
    have to adapt a phrase of my papa: it is a confusion of the first
    waters.

    If time begins at the start of the BB, there is no prior about
    it. Please stop thinking about these things, it can cause brain
    damage in the wrong head.

    --
    dorayme
    dorayme, Jun 30, 2007
    #18
  19. Brian Robertson

    rf Guest

    "dorayme" <> wrote in message
    news:...
    > In article
    > <Xns995F17CDF4D72nanopandaneredbojias@198.186.190.161>,
    > Neredbojias <> wrote:


    > If time begins at the start of the BB, there is prior about it.


    You miss the point. Both of you. Time did not "begin" at the big bang. It
    started to exist, from our point of view. Loose and sloopy I know but, lets
    proceed and hopefully clarify a bit...

    The big bang did not "start", so to say that time did not exist until after
    "the start of the big bang" is erroneous. The big bang simply is. It is a
    boundary condition, from our point of view. On our side of that boundary
    time exists. On the other side, well, ?

    Mr Hawking opines that the big bang is, indeed, a singularity in our concept
    of space/time. As such one can not state anything at all about conditions
    "on the other side" of that singularity. On this side we have time and space
    as we think we know it. On the other side we cannot even conjecture but
    there is/was/will be probably no such thing as time and/or space. For us
    "the other side" does not exist (from our point of view) as it is not
    accessable to us, but we can be sure that different rules apply. There is
    probably no HTML.

    The jury is still out on the "big crunch" at the other end of our concept of
    time. Depends on how much dark matter there is laying about, which is still
    under dispute AFAIK.

    > Please stop thinking about these things, they can cause brain
    > damage in the wrong heads.


    Not really. A knowledge of higher mathematics makes it quite easy to
    understand. One cannot poke a stick at it, nor explain it clearly to the
    layman, but one can debate it ad nauseum, in the arena of the mathematics.

    --
    Richard.
    rf, Jun 30, 2007
    #19
  20. Brian Robertson

    Neredbojias Guest

    On Sat, 30 Jun 2007 11:56:06 GMT dorayme scribed:

    > In article
    > <>,
    > dorayme <> wrote:
    >
    >> This is mistake of yours does not even have a Latin name. I will
    >> have to adapt a phrase of my papa: it is a confusion of the first
    >> waters.
    >>
    >> If time begins at the start of the BB, there is prior about it.
    >> Please stop thinking about these things, they can cause brain
    >> damage in the wrong heads.

    >
    > My God, I only had one glass of wine with dinner tonight!


    How big was the glass?

    > This mistake of yours does not even have a Latin name. I will
    > have to adapt a phrase of my papa: it is a confusion of the first
    > waters.
    >
    > If time begins at the start of the BB, there is no prior about
    > it. Please stop thinking about these things, it can cause brain
    > damage in the wrong head.


    He he he, I'm beginning to think you are correct. Fortunately, I only
    suffer these maladies at fairly infrequent cycles, but the toll can be
    significant. I s'pose I'll hop "on the wagon" for a while now and dally
    with the simplicities of htmlish stuff and the family of ie deviants.

    --
    Neredbojias

    Once I had a little dog
    Who wagged its tail spritely.
    But it walked by the harvestor
    And now is shorter slightly.
    Neredbojias, Jun 30, 2007
    #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. Lenny
    Replies:
    5
    Views:
    405
    Seaside
    Jul 29, 2003
  2. Replies:
    0
    Views:
    512
  3. bbxrider
    Replies:
    0
    Views:
    595
    bbxrider
    Jul 14, 2003
  4. UJ
    Replies:
    8
    Views:
    61,124
  5. Joel Finkel

    Cells[].Text or Cells[].Controls[0]

    Joel Finkel, Sep 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    296
    Joel Finkel
    Sep 1, 2003
Loading...

Share This Page