大家帮忙看看这两个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 发文件给,我帮你看看
你好,已经发邮件给你了。

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제









이 기사는 HTML & LT; Datalist & GT에 대해 논의합니다. 자동 완성 제안을 제공하고, 사용자 경험을 향상시키고, 오류를 줄임으로써 양식을 향상시키는 요소. 문자 수 : 159

이 기사는 HTML & lt; Progress & Gt에 대해 설명합니다. 요소, 그 목적, 스타일 및 & lt; meter & gt의 차이; 요소. 주요 초점은 & lt; progress & gt; 작업 완료 및 & lt; meter & gt; Stati의 경우

이 기사는 HTML & lt; meter & gt에 대해 설명합니다. 범위 내에 스칼라 또는 분수 값을 표시하는 데 사용되는 요소 및 웹 개발의 일반적인 응용 프로그램. & lt; meter & gt; & lt; Progress & Gt; 그리고 Ex

이 기사는 & lt; iframe & gt; 외부 컨텐츠를 웹 페이지, 공통 용도, 보안 위험 및 객체 태그 및 API와 같은 대안을 포함시키는 태그의 목적.

이 기사는 모바일 장치의 반응 형 웹 디자인에 필수적인 Viewport Meta Tag에 대해 설명합니다. 적절한 사용이 최적의 컨텐츠 스케일링 및 사용자 상호 작용을 보장하는 방법을 설명하는 반면, 오용은 설계 및 접근성 문제로 이어질 수 있습니다.

이 기사에서는 브라우저에서 직접 사용자 입력을 검증하기 위해 필요한, Pattern, Min, Max 및 Length 한계와 같은 HTML5 양식 검증 속성을 사용하는 것에 대해 설명합니다.

기사는 HTML5 크로스 브라우저 호환성을 보장하기위한 모범 사례에 대해 논의하고 기능 감지, 점진적 향상 및 테스트 방법에 중점을 둡니다.

이 기사는 html5 & lt; time & gt; 시맨틱 날짜/시간 표현 요소. 인간이 읽을 수있는 텍스트와 함께 기계 가독성 (ISO 8601 형식)에 대한 DateTime 속성의 중요성을 강조하여 Accessibilit를 향상시킵니다.
