【发布时间】:2013-11-29 07:40:28
【问题描述】:
好吧,我几乎可以将文本对齐到中心。我可以使用左右边距自动,它们会在中心正常,我将文本定位中心并工作,但我正在尝试创建带有链接的标题,并且链接不会像对齐段落一样移动。我几乎试图让我的链接到中心,甚至水平。
div {
border: black solid 5px;
margin: 40px;
}
a {
border: green solid 5px;
margin-left: 30px;
margin-right: 30px;
color: red;
text-align:right;
}
p{
border: green solid 5px;
margin-left: 30px;
margin-right: 30px;
color: red;
text-align:center;
}
这是我的html
<link type="index/css" rel="stylesheet" href="css/style.css">
</head>
<body>
<div>
<a href="sksksk">Link</a>
<a href="sksksk">Link</a>
<a href="sksksk">Link</a>
<p> This is a paragraph and I can write whatever I like
Yes this is a damn pargraph and I hate it and dont
know what to say
<p> This is a paragraph and I can write whatever I like
Yes this is a damn pargraph and I hate it and dont
know what to say
<p> This is a paragraph and I can write whatever I like
Yes this is a damn pargraph and I hate it and dont
know what to say
</div>
</body>
【问题讨论】:
-
How to center links in HTML 的可能重复项