無論我做什麼,我的文字鏈接都會繼續向左對齊。 CSS的是:如何將文字居中?
p {
float: center;
text-align: center;
font-size: 20px;
font-family: Gotham-Bold;
src: url(Gotham-Bold.otf);
}
<header>
<h2> <img src="Links Link.png" text-align="center" width="207" height="106"></h2>
</header>
<p> <a href="http://www.chicagotribune.com/entertainment/ct-talking-pictures-mpaa-ratings-20140828-column.html"> Click here to learn about the "Love Actually" controversy </a>
</p>
<p> <a href=: "http://apecsec.org/mpaa-rating-system-controversy/"> Click here for more information on the MPAA rating system </a>
</p>
<p> <a href="http://www.cnn.com/2012/03/08/showbiz/movies/bully-rating-controversy-ew/"> Click here to learn about the "Bully" controversy </a>
</p>
<p> <a href="https://petitions.whitehouse.gov/petition/investigate-chris-dodd-and-mpaa-bribery-after-he-publicly-admited-bribing-politicans-pass"> TAKE ACTION! Sign the petition here </a>
</p>
有誰知道這是我在做什麼錯誤?
不要以爲「浮動:中心」存在 – ggdx
你在查看此?這會產生以下視圖 - http://jsfiddle.net/brettdewoody/u4g7hfp3/ –
浮點數沒有'center'值... –