Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to allign DIV or SPAN tag in a table cell

Status
Not open for further replies.

Plato2

Programmer
Dec 6, 2002
192
US
Is there is a way to align a div or span tag within a table cell? I want to set top and left property for a div or span tag specifically for a table cell.

Thanks in advance
 

If the DIV or SPAN is the only content of the cell, you could use the ALIGN= and VALIGN= attributes of the TD element... Of course, there are probably other ways using CSS, too.

Hope this helps,
Dan

 
You could use:

Code:
#the_div_id {
    margin-top: 10px;
    margin-left: 10px;
}

OR

#the_div_id {
    padding-top: 10px;
    padding-left: 10px;
}

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top