div inside td

Discussion in 'HTML' started by julian_m, Feb 14, 2006.

  1. julian_m

    julian_m Guest

    I'm just looking for a way to adjust the div's position on the cell
    which is actually containing it.

    html:
    <td class="tdcls"><div class="divcls">whatever</div></td>


    css:

    td.tdcls{

    }


    div.divcls{

    }

    for instance, say that I want to render the div 20px below the top of
    the cell. Are there any options distinct than "vertical-align=top" in
    tdcls class? I'm thinking in an option which only adds style to the
    div. Are there any?

    regards - jm
     
    julian_m, Feb 14, 2006
    #1
    1. Advertising

  2. julian_m

    Steve Pugh Guest

    julian_m wrote:
    > I'm just looking for a way to adjust the div's position on the cell
    > which is actually containing it.
    >
    > <td class="tdcls"><div class="divcls">whatever</div></td>
    >
    > for instance, say that I want to render the div 20px below the top of
    > the cell.


    td.tdcls {padding-top: 20px;}
    or
    div.divclas {margin-top: 20px;}

    The CSS box model is explained at:
    http://www.w3.org/TR/CSS21/box.html
    and the CSS table model at:
    http://www.w3.org/TR/CSS21/tables.html

    Steve
     
    Steve Pugh, Feb 14, 2006
    #2
    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. greenflame
    Replies:
    4
    Views:
    936
    dorayme
    Aug 14, 2007
  2. K Viltersten

    <div ... /> and <div ...></div>

    K Viltersten, Mar 30, 2009, in forum: ASP .Net
    Replies:
    4
    Views:
    758
  3. Dwayne Madsen

    Q: Div A inside Div B is larger than Div B

    Dwayne Madsen, Jun 1, 2005, in forum: Javascript
    Replies:
    1
    Views:
    197
    David Dorward
    Jun 1, 2005
  4. mscir
    Replies:
    3
    Views:
    321
    Martin Honnen
    Jun 26, 2005
  5. 123Jim
    Replies:
    0
    Views:
    144
    123Jim
    May 16, 2011
Loading...

Share This Page