【发布时间】:2018-03-11 23:29:41
【问题描述】:
我试图将<p> 标记与<a> 标记内联,但我不知道怎么做。我在 css 中尝试了几种显示类型,但它们要么不起作用,要么对它做了一些奇怪的事情。
(这里是一堆不必要的词,因为事情是说代码太多而词不够。我认为这很愚蠢,因为我所说的就足够了,除非有人特别询问有关某事的详细信息)。
下面是一些示例代码:
body {
margin: 0;
padding: 0;
background-color: #efefef;
}
header {
margin: 0;
margin-top: -10px;
background-color: #ffffff;
}
header p {
margin: 0;
font-family: "arial";
font-size: 50px;
color: #3c3c3c;
margin-top: 10px;
margin-left: 10px;
text-align: center;
}
header a {
}
#information {
width: 500px;
height: 250px;
background-color: #ffffff;
box-shadow: 7px 7px 4px grey;
margin-left: 100px;
margin-top: 150px;
}
#information p {
font-family: "arial";
font-size: 20px;
color: #1febff;
}
#delete {
margin-top: 2000px;
}
<!DOCTYPE html>
<html>
<head>
<title>SaHa | Color Scheme</title>
<link href="style.css" type="text/css" rel="stylesheet" />
</head>
<body>
<header>
<p>SaHa</p>
<a href="#">Menu</a>
</header>
<div id="information">
<p>Pretend that there is a bunch of important information here even though there really isn't.
This is normally where a message that actually means something would go, but this is just a
placeholder because I have nothing important to put here right now.
</p>
</div>
<div id="delete"></div>
</body>
</html>
【问题讨论】: