0

Hi,

have a look at my directory - on the rightside i have the Links by Pagerank.

Icons should be kept on left side but numbers should be right aligned.

How to do it - have checked several times but did not suceed.

Would you require the script to verify?

thanks

Here is the code:

{strip}

	<div align="left">
        
        {if $SHOW_ALL_PR eq '1'}

	   {foreach item=PR from=$PR_STATS }
	    <div style="width:100px;line-height:19px; text-align:right; font-size:11px; font-weight: bold;">
	    <a href="{$smarty.const.DOC_ROOT}/livepagerank.php?pr={$PR.PR}" title="{l}Browse pagerank {$PR.PR} links{/l}">
	    <img align="left" src="/images/pr{$PR.PR}.gif" border="0" alt="{l}Browse pagerank {$PR.PR} links{/l}" />{$PR.COUNT|indent}
	    </a>
	    </div>
	   {/foreach}
        
	{else}
           
	   {foreach item=PR from=$PR_STATS }
	      {if $PR.COUNT > 0}   
		<div style="width:100px;line-height:19px; text-align:center; font-size:11px; font-weight: bold;">
		<a href="{$smarty.const.DOC_ROOT}/livepagerank.php?pr={$PR.PR}" title="{l}Browse pagerank {$PR.PR} links{/l}">
		<img align="left" src="/images/pr{$PR.PR}.gif" border="0" alt="{l}Browse pagerank {$PR.PR} links{/l}" />{$PR.COUNT|indent}
		</a>
		</div>
              {/if}
	   {/foreach}

	{/if}
	
	
	
	
	</div>
3
Contributors
5
Replies
9
Views
9 Years
Discussion Span
Last Post by Nichito
0

you should try working with tables...

create a two column table, align your left column to the left and your right column to the right... you could even align your table to the center of the "links by pagerank" section...

0

I agree, the tables would be a better setup than divs. But if you want to stick with the divs, you might want to try this

<div style="width:100px;line-height:19px; font-size:11px; font-weight: bold;">
     <font align="left">
          <a href="{$smarty.const.DOC_ROOT}/livepagerank.php?pr={$PR.PR}" title="{l}Browse pagerank {$PR.PR} links{/l}"><img align="left" src="/images/pr{$PR.PR}.gif" border="0" alt="{l}Browse pagerank {$PR.PR} links{/l}" />{$PR.COUNT|indent}</a>
     </font>
</div>
<div style="width:100px;line-height:19px; font-size:11px; font-weight: bold;">
     <font align="right">
          <a href="{$smarty.const.DOC_ROOT}/livepagerank.php?pr={$PR.PR}" title="{l}Browse pagerank {$PR.PR} links{/l}"><img align="left" src="/images/pr{$PR.PR}.gif" border="0" alt="{l}Browse pagerank {$PR.PR} links{/l}" />{$PR.COUNT|indent}</a>
     </font>
</div>

Personally, I'd go with the tables. It's easier to do it that way.

0

you can even insert a table inside the div, to keep the format you have... don't be afraid to build a site based on tables... as i always say... combine tables and css, and you'll have a highly powerfull tool...

0

Thanks for your quick replies,

i tried it - but did not succeed. Either i could not see a difference or had all of of a sudden everything twice stated.

@ Nichito: Would you please be so kind to state the entire code how it would be perfect in my case as i am not the expert in this field.

thanks and regards

0

ok... suppose img stands for the graph, n for the record in the databesa (for the image and the rank), and rank for the rank...

it would go something like this:

#pagerank
{
   font-family:verdana; //just an example
   font-color:#aaa;
   font-size: 13px;
}

#pagerank .left
{
   text-align:left;
}

#pagerank .right
{
   text-align:right;
}
<table id="pagerank">
   <tr>
      <td class="left"><img src="img(n).gif"></td>
      <td class="right">rank(n)</td>
   </tr>
   <tr>
      <td class="left"><img src="img(n).gif"></td>
      <td class="right">rank(n)</td>
   </tr>
</table>

remember img , n and rank are all variables and you have to substiturte them for the programming you're using...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.