0

<p>の下部にフロートしたいのです<div>が、私が知る限り、コンパス用のSusyフレームワークを使用するレイアウトをマックアップするかどうかにかかわらず、親<div>を設定することはできません。position:relativeposition:absolute

他にどのようにこれを行うことができますか?

関連するHTMLは次のとおりです。

<header>
  <div class='grid'>
    <div class='logo'>
      <img src='/images/logo3.png'>
    </div>
    <div class='tagline'>
      <p>Fast Facts About Your Website, Your Competition, And Best Practice</p>
    </div>
  </div>
</header>

関連するCSSは次のとおりです。

header {
  clear: both;
}

.grid .logo {
  width: 30.43478%;
  float: left;
  margin-right: 4.34783%;
  display: inline;
  padding-left: 3.75em;
  margin: 0;
}

.grid .tagline {
  width: 65.21739%;
  float: right;
  margin-right: 0;
  #margin-left: -3.75em;
  display: inline;
}
4

1 に答える 1

0

私があなたの質問から理解する限り、あなたはあなた<p>の下に必要なので、私のフィドルlogoの後にあなたのフロートをクリアしてくださいlogo div

<div style="clear: both;"></div>
<div class='tagline'>
  <p>Fast Facts About Your Website, Your Competition, And Best Practice</p>
</div>

そして、なぜフローティング幅を使用しているのですか?それはとても正確である必要がありますか?そしてなぜdisplay: inline;_.logo.tagline

于 2012-10-13T10:00:23.397 に答える