div inside td

J

julian_m

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
 
S

Steve Pugh

julian_m said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top