幫忙看下底部文字怎么左側居中?
突然怎么也想不起來怎么寫了,我寫的這斷代碼,底部文字是左側靠上的,怎么讓它左側居中?
<html> <head> <style?type="text/css"> .aa { width:800px; height:40px; background:gray; color:white; } .left { width:150px; height:200px; float:left; padding:10px; border-left:1px?solid?#000; } .right { width:600px; height:200px; float:left; border-left:1px?solid?#000; padding:10px; } .foot { width:800px; height:40px; background:gray; clear:both; color:white; } </style> </head> <body> <div?class="aa"><h1>這是標題?這是標題</h1></div> <div?class="left"><p>"Never?increase,?beyond?what?is?necessary,?the?number?of?entities?required?to?explain?anything."?William?of?Ockham</p></div> <div?class="right"> <h2>Free?Web?Building?Tutorials</h2> <p>At?imooc.com?you?will?find?all?the?Web-building?tutorials?you?need,?from?basic?HTML?and?XHTML?to?advanced?XML,?XSL,?Multimedia?and?WAP.</p> <p>imooc.com?-?The?Largest?Web?Developers?Site?On?The?Net!</p> </div> <div?class="foot"><p>Copyright?2016?by?YingKe?Investment.</p></div> </body> </html>
【foot部分怎么像下圖這樣左側居中?還有底部文字左邊有間隙怎么寫?padding-left?
最后吐槽一下:提問時有時候代碼語言不能選擇,一點就到提問頁面的后面了,完全被提問頁面覆蓋住了。。。太扯了
2016-08-12