Subsequent declaration on TH and TD doesn't work

Discussion in 'HTML' started by milanobybike@gmail.com, Jan 11, 2007.

  1. Guest

    Ok.. now.. in my css file I declare the following:

    #th { width:100px }
    #th.h50 { width:50px }

    Now.. when I go into the html code and put <th class="h50">, the
    browsers just ignore that and leaves the width to 100px.. usually
    declaring something later overwrites what's been declared earlier..
    Does anyone know why it doesn't work in this case?

    Thank you so much!
    , Jan 11, 2007
    #1
    1. Advertising

  2. Hello,

    wrote:

    > Ok.. now.. in my css file I declare the following:
    >
    > #th { width:100px }
    > #th.h50 { width:50px }


    Replace this with

    th { width:100px }
    th.h50 { width:50px }

    '#' is used to refer to elements by their ID.

    > Now.. when I go into the html code and put <th class="h50">, the
    > browsers just ignore that and leaves the width to 100px.. usually
    > declaring something later overwrites what's been declared earlier..
    > Does anyone know why it doesn't work in this case?


    HTH

    --
    Benjamin Niemann
    Email: pink at odahoda dot de
    WWW: http://pink.odahoda.de/
    Benjamin Niemann, Jan 11, 2007
    #2
    1. Advertising

  3. Guest

    ops, sorry.. I left the # in but it's not there (I removed some parts
    of the actual code not to clutter up my message with useless stuff)..

    which means that the actual code is like the one you wrote.. and
    doesn't work

    (it was #nameofsection th)

    thanx anyway!
    , Jan 11, 2007
    #3
  4. Toby Inkster Guest

    milanobybike wrote:

    > Does anyone know why it doesn't work in this case?


    No. Because you failed to post a URL.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Jan 11, 2007
    #4
  5. Scripsit :

    > ops, sorry..


    Please learn to quote or paraphrase to give context for your reply.

    > I left the # in but it's not there (I removed some parts
    > of the actual code not to clutter up my message with useless stuff)..


    Your problem description is pretty useless without a URL, and posting the
    wrong code was just one indication of this.

    Actually, the use of 100px and 50px suggests that the page should be
    rewritten rather than polished a bit here and there.

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Jan 11, 2007
    #5
  6. Guest

    > Your problem description is pretty useless without a URL, and posting the
    > wrong code was just one indication of this.


    After reading two replies, I understand that this is a problem that I
    am having, which means that my code is not correct somewhere (otherwise
    your replies would have been "Of course, with TD's and TH's you can't
    do that!).. this is good enough a reply to me: I just wanted to know if
    it's something that people is aware of or if it's my code's problem..
    seems to be the latter..

    > Actually, the use of 100px and 50px suggests that the page should be
    > rewritten rather than polished a bit here and there.


    Not quite.. I have a table containing data and I want one of the cells
    to be 50px wide instead of 100px.

    Oh, I forgot to write something very important: I'm in Italy and we all
    know that here in Italy we're like 10 years behind the rest of the
    world.. that's the reason why I HAVE TO use px instead of ems, % or
    nothing at all.. one day we'll have the web like it's meant to be.. not
    yet, though.. and it's a shame, but this is a different story..

    Thank you very much!
    , Jan 11, 2007
    #6
  7. wrote:
    <snip>

    > Oh, I forgot to write something very important: I'm in Italy and we all
    > know that here in Italy we're like 10 years behind the rest of the
    > world.. that's the reason why I HAVE TO use px instead of ems, % or
    > nothing at all.. one day we'll have the web like it's meant to be.. not
    > yet, though.. and it's a shame, but this is a different story..


    Now that explains it all! Way to say "I'm ignorant and damn proud of
    it!" What a shame.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jan 11, 2007
    #7
  8. dorayme Guest

    In article
    <>,
    wrote:

    (earlier:

    > Oh, I forgot to write something very important: I'm in Italy and we all
    > know that here in Italy...


    )

    > ops, sorry..


    It is "oops" not "ops", all tolerance for these things ran out
    when Luigi left.

    --
    dorayme
    dorayme, Jan 11, 2007
    #8
  9. Ed Mullen Guest

    dorayme wrote:
    > In article
    > <>,
    > wrote:
    >
    > (earlier:
    >
    >> Oh, I forgot to write something very important: I'm in Italy and we all
    >> know that here in Italy...

    >
    > )
    >
    >> ops, sorry..

    >
    > It is "oops" not "ops", all tolerance for these things ran out
    > when Luigi left.
    >


    Dang, Martian, you are harsh! ;-)

    --
    Ed Mullen
    http://edmullen.net
    http://mozilla.edmullen.net
    http://abington.edmullen.net
    How can you tell when the blue cheese goes bad?
    Ed Mullen, Jan 11, 2007
    #9
  10. dorayme Guest

    In article <>,
    Ed Mullen <> wrote:

    > >> ops, sorry..

    > >
    > > It is "oops" not "ops", all tolerance for these things ran out
    > > when Luigi left.
    > >

    >
    > Dang, Martian, you are harsh! ;-)


    I am unlikely to mellow until Luigi comes back. It strikes me
    that we might still communicate with him via... a... a... luigi
    board

    Boom boom.

    --
    dorayme
    dorayme, Jan 11, 2007
    #10
  11. mbstevens Guest

    On Fri, 12 Jan 2007 10:29:05 +1100, dorayme wrote:

    > I am unlikely to mellow until Luigi comes back. It strikes me
    > that we might still communicate with him via... a... a... luigi
    > board
    >
    > Boom boom.


    Sounds like a left-floated and cleared ba-dump bump.
    Zhat how one ba-dump bumps down under?
    mbstevens, Jan 11, 2007
    #11
  12. dorayme wrote:

    > .. It strikes me that we might still communicate with him via... a...
    > a... luigi board


    <groan>

    --
    -bts
    -Motorcycles defy gravity; cars just suck
    Beauregard T. Shagnasty, Jan 11, 2007
    #12
  13. dorayme Guest

    In article <>,
    mbstevens <> wrote:

    > On Fri, 12 Jan 2007 10:29:05 +1100, dorayme wrote:
    >
    > > I am unlikely to mellow until Luigi comes back. It strikes me
    > > that we might still communicate with him via... a... a... luigi
    > > board
    > >
    > > Boom boom.

    >
    > Sounds like a left-floated and cleared ba-dump bump.
    > Zhat how one ba-dump bumps down under?


    Pretty well! <g>

    --
    dorayme
    dorayme, Jan 12, 2007
    #13
  14. Andy Dingley Guest

    wrote:

    > Oh, I forgot to write something very important: I'm in Italy


    Just so long as you're not a Swede living in Italy. We really couldn't
    cope with that.
    Andy Dingley, Jan 12, 2007
    #14
    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. Ryan Breakspear
    Replies:
    0
    Views:
    428
    Ryan Breakspear
    Nov 18, 2003
  2. Jules Flynn
    Replies:
    1
    Views:
    139
    Thomas 'PointedEars' Lahn
    May 3, 2004
  3. sc0ri0n
    Replies:
    1
    Views:
    85
    Bob Walton
    May 13, 2004
  4. Sam S.
    Replies:
    2
    Views:
    188
    Tad McClellan
    Feb 9, 2005
  5. perchance
    Replies:
    3
    Views:
    99
    Dr.Ruud
    Jan 27, 2008
Loading...

Share This Page