如何使包装器在网页上的CSS上工作?

时间:2019-02-19 15:06:03

标签: 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>
        <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>&nbsp;
        <br>888-555-5555</div>
        <br>

        <footer>
        Copyright &copy; 2019 Path of Light Yoga Studio
        <br><a href="mailto:mariela@guereca.com">mariela@guereca.com</a>
        </footer>
    </div> <!---Main end --->
</div> <!---Wrapper end --->

1 个答案:

答案 0 :(得分:1)

尝试一下-

#wrapper {background-color: #F5F5F5;max-width: 1200px;width:100%;margin:0 auto;}

将max-width更改为所需的值。希望这会有所帮助!

相关问题