Html 这些空白是从哪里来的?

Html 这些空白是从哪里来的?,html,css,Html,Css,我正在为我的网页设计课做一个项目,却不知道这些空白是从哪里来的。所有的东西都需要彼此接触,但我想我在某个地方有额外的填充物,但我似乎无法精确定位。这是我所有的代码。另外,我想知道如何清除左边我的中的子弹。我尝试了列表样式类型:none,但这似乎没有任何作用 <!doctype html> <html> <head> <meta charset="utf-8"> <title>SylviaGunter WEB-210 Project 6

我正在为我的网页设计课做一个项目,却不知道这些空白是从哪里来的。所有的东西都需要彼此接触,但我想我在某个地方有额外的填充物,但我似乎无法精确定位。这是我所有的代码。另外,我想知道如何清除左边我的
中的子弹。我尝试了
列表样式类型:none
,但这似乎没有任何作用

<!doctype html>
<html>
<head>
<meta charset="utf-8">

<title>SylviaGunter WEB-210 Project 6</title>

<meta name="viewport" content="width=device-width">

<link href='https://fonts.googleapis.com/css?family=Peralta' rel='stylesheet' type='text/css'>

<link href='https://fonts.googleapis.com/css?family=Gochi+Hand|Peralta' rel='stylesheet' type='text/css'>

 <link rel="stylesheet" 
          href=01%20-%20Large%20CSS.css>
<link rel="stylesheet" type="text/css" href="02 - Medium CSS">
<link rel="stylesheet" type="text/css" href="03 - Small CSS">
<link rel="stylesheet" type="text/css" href="04 - Print CSS">
<link rel="stylesheet" type="text/css" href="05 - IE"> 

</head>

    <body>
        <div class="wrapper">
            <body>
    <div class="banner">
        <h1>Best TV Ever</h1>

        <div class="topnav"> 
            <ul>
                <li><a href="#">50s</a></li>
                <li><a href="#">60s</a></li>
                <li><a href="#">70s</a></li>
                <li><a href="#">80s</a></li>
                <li><a href="#">90s</a></li>
            </ul>
        </div>
    </div>
</body>





[insert menu toggle here]
[insert menu checkbox here]





<aside class="sidebar1">

   Best Prime Time Shows
<ul>
    <li><a href="#">Alice</a></li>
    <li><a href="#">All In The Family</a></li>
    <li><a href="#">Barney Miller</a></li>
    <li><a href="#">Beverly Hillbillies</a></li>
    <li><a href="#">Bewitched</a></li>
    <li><a href="#">The Bob Newhart Show</a></li>
    <li><a href="#">The Brady Bunch</a></li>
    <li><a href="#">Gilligan's Island</a></li>
    <li><a href="#">Good Times</a></li>
    <li><a href="#">The Love Boat</a></li>
    <li><a href="#">Mary Tyler Moore</a></li>
    <li><a href="#">M*A*S*H</a></li>
    <li><a href="#">Maude</a></li>
    <li><a href="#">One Day At A Time</a></li>
    <li><a href="#">Petticoat Junction</a></li>
    <li><a href="#">Soap</a></li>
    <li><a href="#">Taxi</a></li>
    <li><a href="#">What's Happening</a></li>
    <li><a href="#">Welcome Back Kotter</a></li>
    <li><a href="#">WKRP In Cincinatti</a></li>
</ul>

            </aside>


<article class="main">

<h2>The Genius of Krofft</h2>

<h3>H.R. Pufnstuff</h3>

<p> <img src="hrpufnstuff.jpg" alt="hrpufnstuff" height="150" width="200">H.R. Pufnstuf centered on a shipwrecked boy named Jimmy. He and his friend, a talking flute named Freddy, take a ride on a mysterious boat, which promised adventures across the sea, to Living Island. The Mayor of Living Island was a friendly and helpful dragon named H.R. Pufnstuf. The boat was actually owned and controlled by a wicked witch named Wilhelmina W. Witchiepoo who rode on a broomstick-like vehicle called the Vroom Broom. She used the boat to lure Jimmy and Freddy to her castle on Living Island, where she was going to take Jimmy prisoner and steal Freddy. But Pufnstuf found out about her plot and was able to rescue Jimmy when he leaped out of the enchanted boat with Freddy and swam ashore.</p>

<h3>Lidsville</h3>


<p><img src="lidsville.jpg" alt="lidsville" height="150" width="200">
The show involved a teenage boy named Mark who fell into the hat of Merlo the Magician and arrived in Lidsville, a land of living hats. The hats on the show are depicted as having the same characteristics as the humans who would normally wear them.</p>

<h3>The Bugaloos</h3>


<p><img src="bugaloos.jpg" alt="bugaloos" height="150" width="200">The Bugaloos featured a musical group composed of four British-accented teenagers, who lived in fictional Tranquility Forest. They wore insect-themed outfits with antennae and wings which allowed them to fly. They were constantly beset by the evil machinations of Benita Bizarre, played by comedienne Martha Raye.</p>

<h3>Land of the Lost</h3>


<p><img src="landlost.jpg" alt="landlost" height="150" width="200">Land of the Lost details the adventures of the Marshall family (father Rick and his teenage children Will and Holly) who are trapped in an alternate universe inhabited by dinosaurs, a primate-type people called Pakuni, and aggressive humanoid/lizard creatures called Sleestak.</p>

<h3>Sigmund the Sea Monster</h3>


<p><img src="sigmund.jpg" alt="sigmund"  height="150" width="200">The show centered on two brothers, Johnny and Scott Stuart, who discover Sigmund, a friendly young sea monster who had been thrown out by his comically dysfunctional undersea family for refusing to frighten people. The boys hide Sigmund in their clubhouse.</p>

            </article>



   <aside class="sidebar2">
  Best Superhero Shows
<ul>
    <li><a href="#">Batman (1966)</a></li>
    <li><a href="#">The Bionic Woman (1976)</a></li>
    <li><a href="#">Electra Woman and Dyna Girl (1976)</a></li>
    <li><a href="#">The Greatest American Hero (1981)</a></li>
    <li><a href="#">The Incredible Hulk (1977)</a></li>
    <li><a href="#">Isis (1975)</a></li>
    <li><a href="#">Shazam! (1974)</a></li>
    <li><a href="#">The Six Million Dollar Man (1974)</a></li>
    <li><a href="#">Wonder Woman (1976)</a></li>
</ul>
            </aside>




<div id="footer">
Stop watching TV and write some code!
            </div>



</body>
</html>

浏览器具有内置样式,默认情况下会添加一些空格(填充和边距),这在不同的浏览器中是不同的。 您需要执行以下操作:

关于项目符号,您需要为两个列表指定:

.sidebar1 ul, .sidebar2 ul {
  list-style-type: none;
}
/* OR */
aside ul {
  list-style-type: none;
}

要修复边栏项目符号列表,请使用:

.sidebar1 ul{
    list-style-type:none;
}

一个文档不能有两个
body
标记,修复后,请在某处创建一个在线标记(jsfiddle,codepen,…),URL中的空格也是您应该避免的。//jsfiddle.net/a0ht06y7/这是jsfiddle很棒!子弹不见了。但是,在中心内容和右侧边栏之间仍然有大约一英寸的空白。当我添加重置css代码时,唯一发生的事情是它将内部ul一直移动到侧栏背景的左边缘。我需要关闭那个空间。不确定如何执行此操作。您正在将:
20px
wide padding设置为
.main
。此外,你是混合固定的百分比宽度,这将使它只能在一个小范围的分辨率宽度。
.sidebar1 ul, .sidebar2 ul {
  list-style-type: none;
}
/* OR */
aside ul {
  list-style-type: none;
}
.sidebar1 ul{
    list-style-type:none;
}