検索
ホームページウェブフロントエンドhtmlチュートリアルこれら 2 つの div の間に分離がない理由を理解できる人はいますか? _html/css_WEB-ITnose

下の図の左の列と右の列を分離したいのですが、左側の幅の値とマージン右の値を制限し、左側をフローティングにすることで、右側のマージン左も 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/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>

関連する 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 してファイルを送ってください。見てみましょう
こんにちは、メールを送りました。

声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
HTML、CSS、およびJavaScriptの理解:初心者向けガイドHTML、CSS、およびJavaScriptの理解:初心者向けガイドApr 12, 2025 am 12:02 AM

webdevelopmentReliesOnhtml、css、andjavascript:1)htmlStructuresContent、2)cssStylesit、および3)Javascriptaddsinteractivity、形成、

HTMLの役割:Webコンテンツの構造HTMLの役割:Webコンテンツの構造Apr 11, 2025 am 12:12 AM

HTMLの役割は、タグと属性を使用してWebページの構造とコンテンツを定義することです。 1。HTMLは、読みやすく理解しやすいようなタグを介してコンテンツを整理します。 2。アクセシビリティとSEOを強化するには、セマンティックタグなどを使用します。 3. HTMLコードの最適化により、Webページの読み込み速度とユーザーエクスペリエンスが向上する可能性があります。

HTMLとコード:用語を詳しく見るHTMLとコード:用語を詳しく見るApr 10, 2025 am 09:28 AM

htmlisaspecifictypeofcodefocuseduructuringwebcontent

HTML、CSS、およびJavaScript:Web開発者に不可欠なツールHTML、CSS、およびJavaScript:Web開発者に不可欠なツールApr 09, 2025 am 12:12 AM

HTML、CSS、およびJavaScriptは、Web開発の3つの柱です。 1。HTMLは、Webページ構造を定義し、などなどのタグを使用します。2。CSSは、色、フォントサイズなどのセレクターと属性を使用してWebページスタイルを制御します。

HTML、CSS、およびJavaScriptの役割:コアの責任HTML、CSS、およびJavaScriptの役割:コアの責任Apr 08, 2025 pm 07:05 PM

HTMLはWeb構造を定義し、CSSはスタイルとレイアウトを担当し、JavaScriptは動的な相互作用を提供します。 3人はWeb開発で職務を遂行し、共同でカラフルなWebサイトを構築します。

HTMLは初心者のために簡単に学ぶことができますか?HTMLは初心者のために簡単に学ぶことができますか?Apr 07, 2025 am 12:11 AM

HTMLは、簡単に学習しやすく、結果をすばやく見ることができるため、初心者に適しています。 1)HTMLの学習曲線はスムーズで簡単に開始できます。 2)基本タグをマスターして、Webページの作成を開始します。 3)柔軟性が高く、CSSおよびJavaScriptと組み合わせて使用​​できます。 4)豊富な学習リソースと最新のツールは、学習プロセスをサポートしています。

HTMLでの開始タグの例は何ですか?HTMLでの開始タグの例は何ですか?Apr 06, 2025 am 12:04 AM

Anexampleapalofastartingtaginhtmlis、それはaperginsaparagraph.startingtagsaresentionentientiontheyinitiateelements、definetheirtypes、およびarecrucialforurturingwebpagesandcontingthomedomを構築します。

CSSのフレックスボックスレイアウトを使用して、メニューの点線のラインセグメンテーション効果のセンターアラインメントを実現する方法は?CSSのフレックスボックスレイアウトを使用して、メニューの点線のラインセグメンテーション効果のセンターアラインメントを実現する方法は?Apr 05, 2025 pm 01:24 PM

メニューで点線のラインセグメンテーション効果を設計する方法は?メニューを設計するときは、通常、皿の名前と価格の間に左右に合わせることは難しくありませんが、真ん中の点線またはポイントはどうですか...

See all articles

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

AI Hentai Generator

AI Hentai Generator

AIヘンタイを無料で生成します。

ホットツール

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

このプロジェクトは osdn.net/projects/mingw に移行中です。引き続きそこでフォローしていただけます。 MinGW: GNU Compiler Collection (GCC) のネイティブ Windows ポートであり、ネイティブ Windows アプリケーションを構築するための自由に配布可能なインポート ライブラリとヘッダー ファイルであり、C99 機能をサポートする MSVC ランタイムの拡張機能が含まれています。すべての MinGW ソフトウェアは 64 ビット Windows プラットフォームで実行できます。

PhpStorm Mac バージョン

PhpStorm Mac バージョン

最新(2018.2.1)のプロフェッショナル向けPHP統合開発ツール

SublimeText3 Linux 新バージョン

SublimeText3 Linux 新バージョン

SublimeText3 Linux 最新バージョン

SecLists

SecLists

SecLists は、セキュリティ テスターの究極の相棒です。これは、セキュリティ評価中に頻繁に使用されるさまざまな種類のリストを 1 か所にまとめたものです。 SecLists は、セキュリティ テスターが必要とする可能性のあるすべてのリストを便利に提供することで、セキュリティ テストをより効率的かつ生産的にするのに役立ちます。リストの種類には、ユーザー名、パスワード、URL、ファジング ペイロード、機密データ パターン、Web シェルなどが含まれます。テスターはこのリポジトリを新しいテスト マシンにプルするだけで、必要なあらゆる種類のリストにアクセスできるようになります。

AtomエディタMac版ダウンロード

AtomエディタMac版ダウンロード

最も人気のあるオープンソースエディター