CSS equivalent

Discussion in 'HTML' started by Todd Cary, Sep 28, 2006.

  1. Todd Cary

    Todd Cary Guest

    I have a <TD> that has these properties:

    <td width="150" bgcolor="#336699" valign="top">

    and I would like to put those properties into a CSS.

    This does not work:

    TD.LeftMenu {
    width: 150;
    position: top;
    background-color: #336699;
    }

    No doubt I have messed up. What is the quivalent?

    Many thanks...

    Todd
    Todd Cary, Sep 28, 2006
    #1
    1. Advertising

  2. Todd Cary

    Kevin Scholl Guest

    Todd Cary wrote:
    > I have a <TD> that has these properties:
    >
    > <td width="150" bgcolor="#336699" valign="top">
    >
    > and I would like to put those properties into a CSS.
    >
    > This does not work:
    >
    > TD.LeftMenu {
    > width: 150;


    150 what? bananas?

    > position: top;


    I believe you're looking for the vertical-align property here.

    > background-color: #336699;


    Could shorten this.

    > }
    >
    > No doubt I have messed up. What is the quivalent?


    td.leftMenu {
    width: 150px;
    vertical-align: top;
    background: #369; }

    <td class="leftMenu ">

    --

    *** Remove the DELETE from my address to reply ***

    ======================================================
    Kevin Scholl http://www.ksscholl.com/

    ------------------------------------------------------
    Information Architecture, Web Design and Development
    ------------------------------------------------------
    We are the music makers, and we are the dreamers of
    the dreams...
    ======================================================
    Kevin Scholl, Sep 28, 2006
    #2
    1. Advertising

  3. Todd Cary

    Todd Cary Guest

    Kevin Scholl wrote:
    > Todd Cary wrote:
    >> I have a <TD> that has these properties:
    >>
    >> <td width="150" bgcolor="#336699" valign="top">
    >>
    >> and I would like to put those properties into a CSS.
    >>
    >> This does not work:
    >>
    >> TD.LeftMenu {
    >> width: 150;

    >
    > 150 what? bananas?
    >
    >> position: top;

    >
    > I believe you're looking for the vertical-align property here.
    >
    >> background-color: #336699;

    >
    > Could shorten this.
    >
    >> }
    >>
    >> No doubt I have messed up. What is the quivalent?

    >
    > td.leftMenu {
    > width: 150px;
    > vertical-align: top;
    > background: #369; }
    >
    > <td class="leftMenu ">
    >


    Kevin -

    I must be missing something else since

    http://209.204.172.137:8090/caht1/php/login.php

    is without the CSS equivalent and

    http://209.204.172.137:8090/caht1/php/login_2.php

    with the above CSS.

    Todd
    Todd Cary, Sep 28, 2006
    #3
  4. Todd Cary wrote:

    > I must be missing something else since


    You would be wise to correct all the errors before proceeding further.

    > http://209.204.172.137:8090/caht1/php/login_2.php


    CSS:
    <http://jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&uri=http%3A%2F%2F209.204.172.137%3A8090%2Fcaht1%2Fphp%2Flogin_2.php>

    HTML:
    <http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2F209.204.172.137%3A8090%2Fcaht1%2Fphp%2Flogin_2.php>
    --
    -bts
    -Motorcycles defy gravity; cars just suck.
    Beauregard T. Shagnasty, Sep 28, 2006
    #4
  5. Todd Cary

    jojo Guest

    jojo, Sep 28, 2006
    #5
  6. Todd Cary

    richard Guest

    "Todd Cary" <> wrote in message
    news:451b42ab$0$34487$...
    >I have a <TD> that has these properties:
    >
    > <td width="150" bgcolor="#336699" valign="top">
    >
    > and I would like to put those properties into a CSS.
    >
    > This does not work:
    >
    > TD.LeftMenu {
    > width: 150;
    > position: top;
    > background-color: #336699;
    > }
    >
    > No doubt I have messed up. What is the quivalent?
    >
    > Many thanks...
    >
    > Todd


    Try learning what the acceptable attributes are first.
    Your approach is correct. But you have not learned the proper ways of doing
    it.
    width? 150 what? In tables it is assumed to be pixels. But in CSS there are
    other measuring tools to consider and MUST be included.
    Position what? Position has nothing to do with the elements within the
    division. But rather the position of the division itself. But then, perhaps
    you should read about it first before implementing it.
    richard, Sep 28, 2006
    #6
  7. richard wrote:
    > Try learning what the acceptable attributes are first. Your approach
    > is correct. But you have not learned the proper ways of doing it.


    Obviously, neither have you. CSS doesn't have attributes.
    Leif K-Brooks, Sep 28, 2006
    #7
  8. Todd Cary wrote:

    > Kevin Scholl wrote:
    > > Todd Cary wrote:
    > >>I have a <TD> that has these properties:
    > > >
    > >> <td width="150" bgcolor="#336699" valign="top">
    > > >
    > > > and I would like to put those properties into a CSS.
    > > >
    > > > This does not work:
    > > >
    > > > TD.LeftMenu {
    > >> width: 150;

    > >
    > > 150 what? bananas?
    > >
    > >> position: top;

    > >
    > > I believe you're looking for the vertical-align property here.
    > >
    > >> background-color: #336699;

    > >
    > > Could shorten this.
    > >
    > > > }
    > > >
    > > > No doubt I have messed up. What is the quivalent?

    > >
    > > td.leftMenu {
    > > width: 150px;
    > > vertical-align: top;
    > > background: #369; }
    > >
    > > <td class="leftMenu ">
    > >

    >
    > Kevin -
    >
    > I must be missing something else since
    >
    > http://209.204.172.137:8090/caht1/php/login.php
    >
    > is without the CSS equivalent and
    >
    > http://209.204.172.137:8090/caht1/php/login_2.php
    >
    > with the above CSS.


    In the CSS version, you specify this in your HTML:
    <td class="menuLeft">

    And this in your CSS:
    td.leftMenu {
    width: 150px;
    vertical-align: top;
    background: #369; }

    If you change your HTML to use class="leftMenu", you'll see a certain
    difference.

    --
    Kim André Akerø
    -
    (remove NOSPAM to contact me directly)
    =?iso-8859-1?Q?Kim_Andr=E9_Aker=F8?=, Sep 28, 2006
    #8
  9. Todd Cary

    jojo Guest

    Todd Cary schrieb:

    >>> <td width="150" bgcolor="#336699" valign="top">
    >>>
    >>> and I would like to put those properties into a CSS.
    >>>
    >>> This does not work:
    >>>
    >>> TD.LeftMenu {
    >>> width: 150;

    >>
    >> td.leftMenu {
    >> width: 150px;
    >> vertical-align: top;
    >> background: #369; }
    >>
    >> <td class="leftMenu ">
    >>

    >
    > I must be missing something else since
    >
    > http://209.204.172.137:8090/caht1/php/login.php
    >
    > is without the CSS equivalent and
    >
    > http://209.204.172.137:8090/caht1/php/login_2.php
    >
    > with the above CSS.


    Hey, didn't realise that first, but... you are using a table layout!!!
    bad thing... if you decide to use CSS (which definetly is a good step!)
    than use CSS for your layout, too, and get rid of those ugly tables. use
    <table> *only* to describe tabular data, not for layout.

    jojo
    jojo, Sep 28, 2006
    #9
    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. Joshua Beall
    Replies:
    20
    Views:
    27,256
    Toby A Inkster
    Feb 24, 2004
  2. Stan SR
    Replies:
    3
    Views:
    2,862
    Gregory
    Jan 30, 2007
  3. MangroveRoot

    CSS equivalent of single-cell table ?

    MangroveRoot, Nov 1, 2007, in forum: HTML
    Replies:
    16
    Views:
    1,093
    dorayme
    Nov 7, 2007
  4. Kenneth McDonald
    Replies:
    6
    Views:
    1,765
    Mark Thomas
    Dec 30, 2008
  5. Replies:
    3
    Views:
    107
    Grant Wagner
    Mar 31, 2005
Loading...

Share This Page