大家帮忙看看这两个div之间为什么没有分隔了?_html/css_WEB-ITnose
想要下面图这个左栏和右栏之间有一个分隔,通过限定左面那个width值和margin-right值,然后float左面,右面margin-left也是10px,但是不知道为啥总是分不出来?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Starbuzz Coffee</title> <link rel="stylesheet" type="text/css" href="starbuzz.css" /> </head> <body> <div id="allcontent"> <div id="header"> <img src="/static/imghw/default1.png" data-src="images/header.gif" class="lazy" alt="Starbuzz Coffee header image" /> </div> <div id="main"> <h1 id="QUALITY-nbsp-COFFEE-nbsp-QUALITY-nbsp-CAFFEINE">QUALITY COFFEE, QUALITY CAFFEINE</h1> <p> At Starbuzz Coffee, we are dedicated to filling all your caffeine needs through our quality coffees and teas. Sure, we want you to have a great cup of coffee and a great coffee experience as well, but we're the only company that actively monitors and optimizes caffeine levels. So stop by and fill your cup, or order online with our new Bean Machine online order form, and get that quality Starbuzz coffee that you know will meet your caffeine standards. </p> <p> And, did we mention <em>caffeine</em>? We've just started funding the guys doing all the wonderful research at the <a href="http://buzz.headfirstlabs.com" title="Read all about caffeine on the Buzz">Caffeine Buzz</a>. If you want the latest on coffee and other caffeine products, stop by and pay them a visit. </p> <h1 id="OUR-nbsp-STORY">OUR STORY</h1> <p> "A man, a plan, a coffee bean". Okay, that doesn't make a palindrome, but it resulted in a damn good cup of coffee. Starbuzz's CEO is that man, and you already know his plan: a Starbuzz on every corner. </p> <p>In only a few years he's executed that plan and today you can enjoy Starbuzz just about anywhere. And, of course, the big news this year is that Starbuzz teamed up with Head First readers to create Starbuzz's Web presence, which is growing rapidly and helping to meet the caffeine needs of a whole new set of customers. </p> <h1 id="STARBUZZ-nbsp-COFFEE-nbsp-BEVERAGES">STARBUZZ COFFEE BEVERAGES</h1> <p> We've got a variety of caffeinated beverages to choose from at Starbuzz, including our <a href="beverages.html#house" title="House Blend">House Blend</a>, <a href="beverages.html#mocha" title="Mocha Cafe Latte">Mocha Cafe Latte</a>, <a href="beverages.html#cappuccino" title="Cappuccino">Cappuccino</a>, and a favorite of our customers, <a href="beverages.html#chai" title="Chai Tea">Chai Tea</a>. </p> <p> We also offer a variety of coffee beans, whole or ground, for you to take home with you. Order your coffee today using our online <a href="form.html" title="form.html">Bean Machine</a>, and take the Starbuzz Coffee experience home. </p> </div> <div id="sidebar"> <p class="beanheading"> <img src="/static/imghw/default1.png" data-src="images/bag.gif" class="lazy" alt="Bean Machine bag" /> <br /> ORDER ONLINE with the <a href="form.html">BEAN MACHINE</a> <br /> <span class="slogan"> FAST <br /> FRESH <br /> TO YOUR DOOR <br /> </span> </p> <p> Why wait? You can order all our fine coffees right from the Internet with our new, automated Bean Machine. How does it work? Just click on the Bean Machine link, enter your order, and behind the scenes, your coffee is roasted, ground (if you want), packaged, and shipped to your door. </p> </div> <div id="footer"> © 2005, Starbuzz Coffee <br /> All trademarks and registered trademarks appearing on this site are the property of their respective owners. </div> </div> </body></html>
相关的CSS代码
#header { background-color: #675c47; margin: 10px; height: 108px;}#main { background: #efe5d0 url(images/background.gif) top left; font-size: 105%; padding: 15px; margin: 0px 10px 10px 10px; width: 420px; float: left;}#sidebar { background: #efe5d0 url(images/background.gif) bottom right; font-size: 105%; padding: 10px; margin: 0px 10px 10px 10px;}
回复讨论(解决方案)
把图给补上去
贴出来的 代码和样式不全,无法帮你找到原因,
可以重新贴一次,或者加我q:1157373706 发文件给,我帮你看看
贴出来的 代码和样式不全,无法帮你找到原因,
可以重新贴一次,或者加我q:1157373706 发文件给,我帮你看看
你好,已经发邮件给你了。

Alat AI Hot

Undresser.AI Undress
Apl berkuasa AI untuk mencipta foto bogel yang realistik

AI Clothes Remover
Alat AI dalam talian untuk mengeluarkan pakaian daripada foto.

Undress AI Tool
Gambar buka pakaian secara percuma

Clothoff.io
Penyingkiran pakaian AI

AI Hentai Generator
Menjana ai hentai secara percuma.

Artikel Panas

Alat panas

Notepad++7.3.1
Editor kod yang mudah digunakan dan percuma

SublimeText3 versi Cina
Versi Cina, sangat mudah digunakan

Hantar Studio 13.0.1
Persekitaran pembangunan bersepadu PHP yang berkuasa

Dreamweaver CS6
Alat pembangunan web visual

SublimeText3 versi Mac
Perisian penyuntingan kod peringkat Tuhan (SublimeText3)

Topik panas



Artikel ini membincangkan html & lt; kemajuan & gt; elemen, tujuan, gaya, dan perbezaan dari & lt; meter & gt; elemen. Tumpuan utama adalah menggunakan & lt; kemajuan & gt; untuk menyelesaikan tugas dan & lt; meter & gt; untuk stati

Artikel ini membincangkan html & lt; datalist & gt; elemen, yang meningkatkan bentuk dengan menyediakan cadangan autokomplete, meningkatkan pengalaman pengguna dan mengurangkan kesilapan. Kira -kira: 159

Artikel membincangkan amalan terbaik untuk memastikan keserasian silang pelayar HTML5, memberi tumpuan kepada pengesanan ciri, peningkatan progresif, dan kaedah ujian.

Artikel ini membincangkan html & lt; meter & gt; elemen, digunakan untuk memaparkan nilai skalar atau pecahan dalam julat, dan aplikasi umum dalam pembangunan web. Ia membezakan & lt; meter & gt; dari & lt; kemajuan & gt; dan Ex

Artikel ini membincangkan menggunakan atribut pengesahan bentuk HTML5 seperti had, corak, min, max, dan panjang untuk mengesahkan input pengguna secara langsung dalam penyemak imbas.

Artikel ini menerangkan html5 & lt; time & gt; elemen untuk perwakilan tarikh/masa semantik. Ia menekankan pentingnya atribut DateTime untuk pembacaan mesin (format ISO 8601) bersama teks yang boleh dibaca manusia, meningkatkan aksesibilit

Artikel ini membincangkan tag Meta Viewport, penting untuk reka bentuk web responsif pada peranti mudah alih. Ia menerangkan bagaimana penggunaan yang betul memastikan skala kandungan yang optimum dan interaksi pengguna, sementara penyalahgunaan boleh membawa kepada isu reka bentuk dan kebolehaksesan.

Artikel ini membincangkan & lt; iframe & gt; Tujuan TAG dalam membenamkan kandungan luaran ke dalam halaman web, kegunaan umum, risiko keselamatan, dan alternatif seperti tag objek dan API.
