Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么可以';我不能在这个HTML文档中添加更多的段落吗?_Html_Css - Fatal编程技术网

为什么可以';我不能在这个HTML文档中添加更多的段落吗?

为什么可以';我不能在这个HTML文档中添加更多的段落吗?,html,css,Html,Css,我已经在Codecademy完成了HTML和CSS课程,现在我想学习Python 在此之前,我想建立一个关于我将要学习的东西的小网站,只是为了练习我的HTML和CSS技能 我遇到了麻烦,因为我无法在HTML文件下添加更多内容,也不知道为什么 以下是HTML(也在上): 以下是我的JSFIDLE: 这里有人知道我为什么不能添加更多的段落吗? 元素必须位于main内部,首先是类texto的div,否则,就像您的“oi”文本一样,*由于您使用的CSS,它将出现在文档流之外 此外,在您将其放入的上下文中

我已经在Codecademy完成了HTML和CSS课程,现在我想学习Python

在此之前,我想建立一个关于我将要学习的东西的小网站,只是为了练习我的HTML和CSS技能

我遇到了麻烦,因为我无法在HTML文件下添加更多内容,也不知道为什么

以下是HTML(也在上):

以下是我的JSFIDLE:

这里有人知道我为什么不能添加更多的段落吗?

元素必须位于main内部,首先是类
texto
div
,否则,就像您的“oi”文本一样,*由于您使用的CSS,它将出现在文档流之外

此外,在您将其放入的上下文中使用时,这对于包装器来说不是一个很好的实践:

.texto {
    position: absolute;
}
这可能会给你带来很多困惑,当你从Codeacademy的网站(它是一个左侧栏)断章取义的时候,它就没有任何意义了


*您忘了关闭“oi”的

元素,但不要担心,这也会发生在最有经验的开发人员身上!事实上,但我来自思想学派,如果所有非自动关闭的元素都关闭了,它会更健壮,更能证明未来的代码。

@GoodbyeEarl,没问题,很乐意帮助:)
html, body, form, fieldset, legend {
    margin: 0;
    padding: 0;
}
h1, h2, h3, h4, h5, h6, p {
    margin-top: 0;
}
fieldset,img {
    border: 0;
}
legend{
    color: #000;
}
sup {
    vertical-align: text-top;
}
sub {
    vertical-align: text-bottom;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
caption, th, td {
    text-align: left;
    vertical-align: top;
    font-weight: normal;
}
input, textarea, select {
    font-size: 110%;
    line-height: 1.1;
}
abbr, acronym {
    border-bottom: .1em dotted;
    cursor: help;
}

/*o meu código começa aqui, o código acima é um reset*/
/*fonte do reset: http://www.maxdesign.com.au/articles/css-reset/ */

html {
    width: 1300px;
    margin: 0 auto;
    font-family: sans-serif;
    font-size: 0.95em;
    color: #424242;
    background-color: #FFFFFF;
}
body {

}
.texto {
    position: absolute;
    top: 20px;
    width: 550px;
}
#instrucoes {
    background-color: #FAFAFA;
    width: 536px;
    padding: 5px;
    color: #585858;
    border: 2px solid #D8D8D8;
}
#hint {
    background-color: #FAFAFA;
    width: 536px;
    padding: 5px;
    color: #585858;
    border: 2px solid #D8D8D8;
    margin: 10px 0 0 0;
}
.codigo {
    position: absolute;
    left: 630px;
    top: 65px;
    padding: 10px;
    width: 676px;
    height: 420px;
    background-color: #e6efc2;
    color: #264409;
    border: 2px solid #c6d880;
    font-family: mono;
    font-weight: bold;
    font-size: 0.85em;
}
#voltar {
    position: absolute;
    left: 1275px;
    top: 25px;
    color: #585858;
}
a:link {text-decoration: none;}
a:visited {text-decoration: none;}
a:hover {background-color: #F2F2F2; }
a:active {text-decoration: none;}
hr {
    border: 0;
    width: 100%;
    color: #D8D8D8;
    background-color: #D8D8D8;
    height: 2px;
}
.texto {
    position: absolute;
}