Html中的文字无法正确显示

时间:2017-01-06 02:21:36

标签: html css footer sections

我是html和css的新手,我正在尝试学习一些东西。我正在关注琳达的教程,我正在筹码。我一次又一次地做了这件事似乎仍然存在。

段落或< p>包含一些单词。页脚覆盖。如果不修改页脚的页边距,页脚将在导航栏后启动(现在页边距开始增加5%)。我想做的是在段落之后开始页脚。

请伸出援助之手。提前致谢。 HOW IT LOOKS HTML代码:



@charset "utf-8";
h1 {
	font-size: 2em;
	font-family: league-gothic;
	font-style: normal;
	font-weight: 400;
}
h2 {
	font-family: bitter;
	font-style: normal;
	font-weight: 400;
	font-size: 1.2em;
}
nav {
	background-color: #222325;
	color: #FFFFFF;
	text-align: center;
	margin-left: 5%;
	margin-right: 5%;
}
footer {
	text-align: center;
	color: #FFFFFF;
	background-color: #222325;
	font-size: x-small;
	margin-top: 5%;
	margin-right: 5%;
	margin-bottom: 5%;
	margin-left: 5%;
	padding-top: 5px;
	padding-bottom: 5px;
}




body {
	font-family: source-sans-pro;
	font-style: normal;
	font-weight: 200;
}
.assideLeft {
	width: 30%;
	margin-left: 5%;
	margin-right: 2.5%;
	float: left;
}
.sectionRight {
	width: 50%;
	margin-left: 2.5%;
	margin-right: 5%;
	float: right;
}

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<link href="Styles.css" rel="stylesheet" type="text/css">
<!--The following script tag downloads a font from the Adobe Edge Web Fonts server for use within the web page. We recommend that you do not modify it.--><script>var __adobewebfontsappname__="dreamweaver"</script><script src="http://use.edgefonts.net/source-sans-pro:n2:default;league-gothic:n4:default;bitter:n4:default.js" type="text/javascript"></script>
</head>

<body>
<header>LADY M 
  <nav>Home About Fashion Contact </nav>
</header>
<aside class="assideLeft">
   <h1>Where fashion meets everyday standards.</h1>
</aside>

<section class="sectionRight">
	<h2>Woman News</h2>
<p>I am an economics student that is interested in fashion, mode, trending styles and woman's life style. I have a successful account at Polyvore, where I communicate with other people, check new trend, have fun and doing my part to make the world a more beautiful place.</p>
</section>

<footer>Copyright Alexandros Tsoskounoglou.</footer> 
</body>

</html>
&#13;
&#13;
&#13;

3 个答案:

答案 0 :(得分:1)

使用

clear:both;

在你的页脚上。 这是完整的文档https://developer.mozilla.org/en-US/docs/Web/CSS/clear

答案 1 :(得分:0)

这是你要找的吗?尝试删除

margin-left: 2.5%;
margin-right: 5%;
float: right;

在.sectionRight

@charset "utf-8";
h1 {
	font-size: 2em;
	font-family: league-gothic;
	font-style: normal;
	font-weight: 400;
}
h2 {
	font-family: bitter;
	font-style: normal;
	font-weight: 400;
	font-size: 1.2em;
}
nav {
	background-color: #222325;
	color: #FFFFFF;
	text-align: center;
	margin-left: 5%;
	margin-right: 5%;
}
footer {
	text-align: center;
	color: #FFFFFF;
	background-color: #222325;
	font-size: x-small;
	margin-top: 5%;
	margin-right: 5%;
	margin-bottom: 5%;
	margin-left: 5%;
	padding-top: 5px;
	padding-bottom: 5px;
}




body {
	font-family: source-sans-pro;
	font-style: normal;
	font-weight: 200;
}
.assideLeft {
	width: 30%;
	margin-left: 5%;
	margin-right: 2.5%;
	float: left;
}
.sectionRight {
	width: 50%;
}
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<link href="Styles.css" rel="stylesheet" type="text/css">
<!--The following script tag downloads a font from the Adobe Edge Web Fonts server for use within the web page. We recommend that you do not modify it.--><script>var __adobewebfontsappname__="dreamweaver"</script><script src="http://use.edgefonts.net/source-sans-pro:n2:default;league-gothic:n4:default;bitter:n4:default.js" type="text/javascript"></script>
</head>

<body>
<header>LADY M 
  <nav>Home About Fashion Contact </nav>
</header>
<aside class="assideLeft">
   <h1>Where fashion meets everyday standards.</h1>
</aside>

<section class="sectionRight">
	<h2>Woman News</h2>
<p>I am an economics student that is interested in fashion, mode, trending styles and woman's life style. I have a successful account at Polyvore, where I communicate with other people, check new trend, have fun and doing my part to make the world a more beautiful place.</p>
</section>

<footer>Copyright Alexandros Tsoskounoglou.</footer> 
</body>

</html>

答案 2 :(得分:0)

@charset "utf-8";
h1 {
	font-size: 2em;
	font-family: league-gothic;
	font-style: normal;
	font-weight: 400;
}
h2 {
	font-family: bitter;
	font-style: normal;
	font-weight: 400;
	font-size: 1.2em;
}
nav {
	background-color: #222325;
	color: #FFFFFF;
	text-align: center;
	margin-left: 5%;
	margin-right: 5%;
}
footer {
	text-align: center;
	color: #FFFFFF;
	background-color: #222325;
	font-size: x-small;
	margin-top: 5%;
	margin-right: 5%;
	margin-bottom: 5%;
	margin-left: 5%;
	padding-top: 5px;
	padding-bottom: 5px;
    clear:both;

}




body {
	font-family: source-sans-pro;
	font-style: normal;
	font-weight: 200;
}
.assideLeft {
	width: 30%;
	margin-left: 5%;
	margin-right: 2.5%;
	float: left;
}
.sectionRight {
	width: 50%;
	margin-left: 2.5%;
	margin-right: 5%;
	float: right;
}
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<link href="Styles.css" rel="stylesheet" type="text/css">
<!--The following script tag downloads a font from the Adobe Edge Web Fonts server for use within the web page. We recommend that you do not modify it.--><script>var __adobewebfontsappname__="dreamweaver"</script><script src="http://use.edgefonts.net/source-sans-pro:n2:default;league-gothic:n4:default;bitter:n4:default.js" type="text/javascript"></script>
</head>

<body>
<header>LADY M 
  <nav>Home About Fashion Contact </nav>
</header>
<aside class="assideLeft">
   <h1>Where fashion meets everyday standards.</h1>
</aside>

<section class="sectionRight">
	<h2>Woman News</h2>
<p>I am an economics student that is interested in fashion, mode, trending styles and woman's life style. I have a successful account at Polyvore, where I communicate with other people, check new trend, have fun and doing my part to make the world a more beautiful place.</p>
</section>

<footer>Copyright Alexandros Tsoskounoglou.</footer> 
</body>

</html>