2014-09-21 73 views
0

我试图将这个盒子移到屏幕的右侧,不管分辨率如何,但我无法找到答案。Css/php - 移动块右键

我的代码是这样的

wp_get_archives(
    array(
     'type' => 'postbypost', 
     'limit' => 5, 
     'format' => 'html', 
     'before' => '<span style="display: block; background: none repeat scroll 0 0 rgba(0, 0, 0, 0.6); width: 300px; position: relative; top: 30px; right: 0; padding: 20px 20px 13px 20px; font-size: 17px; text-align: right; list-style-type: none; ">', 
     'after' => '</span>', 
    ) 
); 

谁能告诉我缺什么让它往屏幕的右侧,没有任何问题的解决使用?

谢谢!

+0

Plz添加它的html模板以及 – SSS 2014-09-21 08:03:01

+0

你试过align =“right”吗? – Elasek 2014-09-21 08:09:35

回答

1

尝试在您的代码中使用float:right;Link to W3

你必须考虑使用一个css类来提高可读性。

0

很难说这里有什么限制,我对WP不太熟悉,但是你有没有试过设置下面的CSS?
position:absolute;
right:0;