将结果对齐 [英] Align result to the right

查看:84
本文介绍了将结果对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我再次问同样的问题,现在有更多的细节,希望能得到有效的解决方案。



在下面的代码中,输出对齐打印到右边

 < table border =1style =width:100%> 
< tr>
< td align =right>
< div style =float:right;> test< / div>
< / td>
< / tr>
< / table>

在下面的代码中,输出不对齐到行的右侧因此 float:right; 对代码没有任何影响:



函数pagination()返回以下内容:
1 2 3 4 ... 15 16 NEXT

  =1style =width:100%> 
< tr>
< td align =right>
< div style =float:right;><?php echo pagination($ total,$ limit,$ page); ?>< / div>
< / td>
< / tr>
< / table>

有关将上述内容向右移动的任何建议,请予以谅解。

解决方案

您尝试过:

  .paginate {text-align:right; } 

并将类分页分配给您的div?



更新



更新为!important

  .paginate {text-align:right!important;} 
pre>

查看此 演示 ,它的工作原理,所以我认为你有其他的优先于规则。


I’m asking the same question again, now with more details, hopefully to receive effective solution.

In the code below the output aligned the printing to the right of the row:

<table border="1" style="width:100%"> 
<tr> 
<td align="right"> 
<div style="float:right;">test</div> 
</td> 
</tr> 
</table>

In the code below the output doesn’t aligned to the right of the row (the output stays on the left side of the row), so float:right; doesn’t have any influence on the code:

The function pagination() returns the following: 1 2 3 4 … 15 16 NEXT

<table border="1" style="width:100%"> 
<tr> 
<td align="right"> 
<div style="float:right;"><?php echo pagination($total, $limit, $page); ?></div> 
</td> 
</tr> 
</table>

Any advise regarding aligning the above to the right, would be appreciated.

解决方案

Have you tried:

.paginate{ text-align:right; }

And assign class paginate to your div?

Update

Decalre it as !important

.paginate{ text-align:right !important;}

See this demo, it works, so I think you have something else which is taking precedence over the rule.

这篇关于将结果对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆