gpt4 book ai didi

css - HTML5 页脚背景颜色问题

转载 作者:太空宇宙 更新时间:2023-11-04 11:11:02 25 4
gpt4 key购买 nike

我正在用 HTML5 创建一个网页。我使用的是基本页脚,但页脚的背景色直到页面边框才延伸。它周围有黄色边框,尽管我给了它明显的边距。你们能告诉我如何修复页脚的边距,使没有黄色,只有白色吗?

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8">
<title>San Joaquin Valley Town Hall</title>
<link rel="shortcut icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../styles/normalize.css">
<link rel="stylesheet" href="../styles/c05x_sorkin.css">

<style>

body {
background-color: yellow;
font-size: default;
border: 10px double blue;
width: 650px;
margin-left: auto;
margin-right: auto;
margin-bottom: 40px;
padding-bottom: 0px;



}

img {
float: left;
margin: 20px;
}

main {

text-align: left;
background-color: white;
padding-left: 30px;
padding-right:30px;
padding-top: 12px;
padding-bottom: 0px;


}

h1 {
color: blue;
font-size: 150%;
}

h2 {
font-size: 125%;
margin-bottom: 5px;
}

h3 {
font-size: 115%;
margin-bottom: 0px;
}

blockquote {
margin: 0px;
}

ul{
margin-left: 0px;
padding-left: 20px;
}

li {
margin-left: 0px;
margin-top: 0px;
}

p.citation {
text-align: right;
margin-bottom: .75em;
}

cite{

color: blue;
font-style: normal;
}

footer {
text-align: center;
border-top: 3.5px solid blue;
margin-right: 20px;
margin-left: 20px;
padding-top: 0px;
background-color: white;
font-weight: bold;
font-size: 90%


}


</style>

</head>

<body>
<main>

<h1>Andrew Ross Sorkin, author of <i>Too Big to Fail</i></h1>

<h3>November 2015</h3>

<img src="../images/sorkin_desk260.jpg" alt="Andrew Ross Sorkin" width="260">

<p>New York Times columnist and author, Andrew Ross Sorkin, has been described as <q>the most famous financial journalist of his generation.</q> A leading voice on Wall Street and corporate America, his New York Times bestseller, <i>Too Big to Fail</i>, was the first true, behind-the-scenes, moment-by-moment account of how that financial crisis developed into a global tsunami.</p>

<p>The Economist, The Financial Times, and Business Week all named <i>Too Big To Fail</i> one of the best books of the year. The book was published by Viking October 20, 2009. The book was adapted as a movie by HBO Films and premiered on HBO on May 23, 2011. The film was directed by Curtis Hanson, and the screenplay was written by Peter Gould.</p>

<h2>Praise for <i>Too Big to Fail</i></h2>

<blockquote>&ldquo;Vigorously reported, superbly organized...for those of us who didn't pursue MBAs and have the penny-ante salaries to prove it.&rdquo;</blockquote>
<p class="citation"><cite>Julia Keller, Chicago Tribune</cite></p>

<blockquote>&ldquo;Sorkin's prodigious reporting and lively writing put the reader in the room for some of the biggest-dollar conference calls in history. It's an entertaining, brisk book.&rdquo;</blockquote>
<p class= "citation"><cite>Paul M. Barrett, The New York Times Book Review</cite></p>

<h2>The cast of the movie: <i>Too Big to Fail</i></h2>

<ul>
<li>William Hurt as Hank Paulson</li>
<li>Paul Giamatti as Ben Bernanke</li>
<li>Billy Crudup as Timothy Geithner</li>
<li>Edward Asner as Warren Buffet</li>
</ul>

</main>

<footer>
<p>Prepared by: Alisha Matreja</p>
<p>Date: November 8th, 2015</p>
</footer>

</body>
</html>

最佳答案

我相信你会追求这个结果 https://jsfiddle.net/8Lfttr01/

只需将 margin-leftmargin-right 从您的 .footer CSS 中取出

关于css - HTML5 页脚背景颜色问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33620433/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com