search
HomeWeb Front-endHTML TutorialCan anyone help me find out why there is no separation between these two divs? _html/css_WEB-ITnose

I want to have a separation between the left column and the right column in the picture below. By limiting the width value and margin-right value on the left, then float the left side, and the margin-left on the right side is also 10px, but I don’t know why it is always divided. Not coming out?

<!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/imghwm/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/imghwm/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">	      &copy; 2005, Starbuzz Coffee	      <br />	      All trademarks and registered trademarks appearing on 	      this site are the property of their respective owners.	    </div>	  </div>  </body></html>

Relevant CSS code
#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;}


Reply to the discussion (solution)

Add the picture Go up

The code and style posted are incomplete and I can’t help you find the reason.
You can repost it, or add me at q: 1157373706 and send the file and I will help you take a look

The code and style posted are incomplete and I can’t help you find the reason.
You can repost it, or add me at q: 1157373706 and send the file and I will help you take a look
Hello, I have sent you an email.

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft