2014-12-06 38 views
-1

我有錯差一些美觀的代碼在這裏(尤其是div的填充和利潤率的東西),把它不適用於現在 件事情讓我做了一個位置:固定股利和放在一個文本對齊,但它不對齊文本的text-align不是位置內工作:定格

<div style="background-color: black; width: 100%; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-bottom: 0px; margin-right: 0px; margin-left: 0px; position: fixed; top: 0px; right: 0px;"> 
    <br><a style="color: white; text-align: left;">Hi, </a> 
    <a href="profile.php" style="color: white; text-align: left;">USERNAME</a> 
    <a href="settings.php" style="color: white; text-align: right;">settings</a><a style="color: white; text-align: right;">|</a><a href="logout.php" style="color: white; text-align: right;">logout</a> 
    <br><a style="color: black;">.</a></div> 
<br><br><br> 
+0

@GolezTrol WOW!謝謝!有用! – rebane2001 2014-12-06 16:44:25

回答

0

必須設置爲text-align:right股利而不是鏈接。

<div style="text-align:right;background-color:black;width:100%;padding-top: 0px;padding-right: 0px;padding-bottom: 0px;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-right: 0px;margin-left: 0px;position: fixed;top: 0px;right: 0px;"><br> 
<a style="color:white;text-align: left;">Hi, </a><a href="profile.php" style="color:white;text-align: left;">USERNAME</a> 
<a href="settings.php" style="color:white;">settings</a><a style="color:white;">|</a><a href="logout.php" style="color:white;">logout</a> 
<br><a style="color:black;">.</a></div><br><br><br> 
+0

不,這是行不通的,因爲我想向左走DIV的一個部分,另外一個向右走 – rebane2001 2014-12-06 16:43:18