2015-05-24 45 views
-4

我將標頭與左對齊:100px;等與px的。然後我將它改爲%,如左:10%;.它在另一臺電腦上看起來不錯,但現在在我的電腦上看起來很糟糕。另外,當窗口變小時,它們會一起放置。我希望它在所有電腦上都很好看。鏈接是:http://www.avatarcentral.x10.mx/。該編碼如下:我無法很好地對齊我的標頭

<!header part> 
    <div style="position: fixed; top: 15px; right: 0px; font-size: 23.777px; line-height: 35px; left: 11.777%; color: white;"><a href="http://www.avatarcentral.x10.mx/home" id="nounderlineurl"><font color='white'>HOME</font></a></div> 
    <div style="position: fixed; top: 15px; right: 0px; font-size: 23.777px; line-height: 35px; left: 23.5%; color: white;"><?php if ($user['purchased'] == '1'){ ?><a href="http://www.avatarcentral.x10.mx/account" id="nounderlineurl"><font color='white'>ACCOUNT</font></a><?php }else{ ?><a href="http://www.avatarcentral.x10.mx/purchase" id="nounderlineurl"><font color='white'>PURCHASE</font></a><?php } ?></div> 
    <div style="position: fixed; top: 15px; right: 0px; font-size: 23.777px; line-height: 35px; left: 68.777777777%; color: white;"><a href="http://www.avatarcentral.x10.mx/contact" id="nounderlineurl"><font color='white'>CONTACT</font></a></div> 
    <?php if ($logged == false){ ?> 
    <div style="position: fixed; top: 15px; right: 0px; font-size: 23.777px; line-height: 35px; left: 81%; color: white;"><a href="http://www.avatarcentral.x10.mx/signin" id="nounderlineurl"><font color='white'>SIGN IN</font></a></div> 
    <?php 
    }else{ 
    ?> 
    <div style="position: fixed; top: 15px; right: 0px; font-size: 23.777px; line-height: 35px; left: 81%; color: white;"><a href="http://www.avatarcentral.x10.mx/signout" id="nounderlineurl"><font color='white'>SIGN OUT</font></a></div> 
    <?php 
    } 
    ?> 
    </div> 
    </div> 
    </div> 
+1

您有一個網站試圖出售定製網站,但你不能修復自己的HTML問題? – j08691

+0

@ j08691我代碼的PHP和網站的東西,我不能編碼HTML,但儘管如此。 –

+0

你的代碼與不必要的代碼混淆在一起。嘗試重寫它。添加填充,以避免泡吧 – Prime

回答

0

刪除right:0pxleft:11%這樣的標籤。然後使.css文件,並添加float:leftmargin:0 auto;

+0

這不會讓它變成我想要的樣子,我希望線高爲35px; (我保留了這些和東西),但是這使得我可以一路添加paddnig,然後呢? idk我希望它成爲家庭,購買,定製的網站,聯繫人,登錄 –