Html 如何使包装器在我的网页的CSS上工作?
我正在尝试将包装器连接到css,但我不知道我做错了什么…以下是html索引页:Html 如何使包装器在我的网页的CSS上工作?,html,css,wrapper,Html,Css,Wrapper,我正在尝试将包装器连接到css,但我不知道我做错了什么…以下是html索引页: <div id="wrapper"> <header><h1>Path of Light Yoga Studio</h1></header> <nav><ul> <li><a href="index.html">Home</a></li>
<div id="wrapper">
<header><h1>Path of Light Yoga Studio</h1></header>
<nav><ul>
<li><a href="index.html">Home</a></li>
<li><a href="classes.html">Classes</a></li>
<li><a href="schedule.html">Schedule</a></li>
<li><a href="contact.html">Contact</a></li>
</ul></nav>
<div id="main">
<img src="http://marielaguereca.info/1510/yoga/yogadoor.jpg" alt="Yoga Door" height="300" width="225" class="floatleft">
<h2>Find Your Inner Light</h2>
<p> <span class="studio">Path of Life Yoga Studio</span> provides all levels of yoga pratice in a tranquil, peaceful environment. Whether you are new to yoga or an experienced practitioner, our dedicated instructors can develop a practice to meet your needs. Let your inner light shine at the <span class="studio">Path of Light Yoga Studio.</span></p>
<ul>
<li>Hatha, Vinyasa, and Resorative Yoga classes</li>
<li>Drop-ins welcome</li>
<li>Mats, blocks, and blankets provided</li>
<li>Relax in our Serenity Lounge before or after your class</li>
</ul>
<div class="clear"><span class="studio">Path of Light Yoga Studio</span>
<br>612 Serenity Way
<br>El Dorado, CA 96162
<br>
<br>888-555-5555</div>
<br>
<footer>
Copyright © 2019 Path of Light Yoga Studio
<br><a href="mailto:mariela@guereca.com">mariela@guereca.com</a>
</footer>
</div> <!---Main end --->
</div> <!---Wrapper end --->
试试这个-
#wrapper {background-color: #F5F5F5;max-width: 1200px;width:100%;margin:0 auto;}
将“最大宽度”更改为您需要的任何宽度。希望这有帮助 包装{宽度:80%;背景颜色:F5最小宽度:1200px;最大宽度:1480px;左边距:自动;右边距:自动;}不完全理解。似乎您想要这样:为什么设置宽度2次?