Hi,
You could just use text-align:right and add 25px padding to the right side of the cell.
If you have other content on that line then you may want to float as Ramsay suggests.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
.tdnavtext p{
margin-right: 25px;
text-align:right;
float:right;
display:inline;/*ie double margin fix*/
}
</style>
</head>
<body>
<table cellspacing="0" cellpadding="0">
<tr>
<td valign="top" class="tdnavtext" background="nav.jpg" width="980" height="50"><p>testblah</p></td>
</tr>
</table>
</body>
You may find that you need to give the float a width if you have other content on the same line etc.. Just remember that floated content must come befor anything else on the same line otherwise it drops to the next line.
If you have other contetn on the line then you may want to change the float to a span. e.g.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
.tdnavtext span {
margin-right:25px;
text-align:right;
float:right;
display:inline;/*ie double margin fix*/
}
</style>
</head>
<body>
<table cellspacing="0" cellpadding="0">
<tr>
<td valign="top" class="tdnavtext" background="nav.jpg" width="980" height="50"><p><span>This sits right</span>Other content sits left </p></td>
</tr>
</table>
</body>
</html>
Hope that helps.
Paul
Bookmarks