Rama Rao M Rama Rao M - 1 month ago 6
HTML Question

td tag content is not aligned to right

I have a table of one row with two columns.I want to align content of second column to right...My content is not aligned to right..Can you check that what is wrong there.......

Here is my code....

<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="content-style-type" content="text/css"> <style>

table td{
border:1px solid green;
}

#Paginator ul{ margin:0px;padding:0px;}
#Paginator ul li{ font-family::Arial,Tahoma,helvetica,sans-serif;font-size:9pt;list-style:none;float:left;margin:2px;padding:4px 8px 2px 8px;border:1px solid black;cursor:pointer;}
#Paginator ul li,#PrevPage{display:none;}
</style>

<body>

<table style="border:1px solid red;width:100%"><tr>
<td>
<b style="float:left;">Number of Matching Addresses:&nbsp; 49 &nbspNumber of pages: 5</b>
</td>

<td align="right">

<script>

var ga_pageId = new Array();
function pageNavigate(){if(document.getElementById("FromPage")){ var fromPage = parseInt( document.getElementById("FromPage").value);} if(document.getElementById("ToPage")){var toPage = parseInt( document.getElementById("ToPage").value);}if(fromPage == 1){document.getElementById("PrevPage").style.display="none";} else{ document.getElementById("PrevPage").style.display="inline"; }if(toPage == 5 || toPage<5){document.getElementById("NextPage").style.display="none";}else{ document.getElementById("NextPage").style.display="inline"; }for(var j=0;j<ga_pageId.length;j++){if(document.getElementById(ga_pageId[j])){document.getElementById(ga_pageId[j]).style.display="none"}}for(var i=fromPage;i<=toPage; i++){ var pageId = 'PAGE_'+i;if(document.getElementById(pageId))document.getElementById(pageId).style.display="inline"; }}

function previousPage(){var fromPageEle = document.getElementById("FromPage");var toPageEle = document.getElementById("ToPage");if(fromPageEle && toPageEle){fromPageEle.value = parseInt(fromPageEle.value) - 1;toPageEle.value = parseInt(toPageEle.value) - 1;pageNavigate();}}

function nextPage(){var fromPageEle = document.getElementById("FromPage");var toPageEle = document.getElementById("ToPage");if(fromPageEle && toPageEle){fromPageEle.value = parseInt(fromPageEle.value) + 1;toPageEle.value = parseInt(toPageEle.value) + 1; pageNavigate();}}

function pageOver(lv_this){if(lv_this.selected!='X')lv_this.style.backgroundColor = "#52CFCF";}
function pageOut(lv_this){if(lv_this.selected!='X')lv_this.style.backgroundColor = "#E6EFFA";}

</script>

<div id="Paginator">
<input type="hidden" id="FromPage" value="1"/>
<input type="hidden" id="ToPage" value="5 "/>
<ul >

<li onClick="previousPage()" id="PrevPage"><span>PREV</span></li>
<script> ga_pageId.push('PAGE_1');</script>

<li id="PAGE_1">1 </span></li>
<script> ga_pageId.push('PAGE_2');</script>

<li id="PAGE_2" >2 </span></li>
<script> ga_pageId.push('PAGE_3');</script>

<li id="PAGE_3" >3 </span></li><script> ga_pageId.push('PAGE_4');</script>

<li id="PAGE_4">4 </span></li>
<script> ga_pageId.push('PAGE_5');</script>

<li id="PAGE_5">5 </span>
</li>
<li onClick="nextPage()" id="NextPage" style="display:none"><span>NEXT</span></li>
</ul> </div>

<script> pageNavigate()</script>

</td>
</tr>
</table>

</body></html>

Answer

Add this css:

 #Paginator ul{ margin:0px;padding:0px; float:right;}