【问题标题】:stuck with css problem. float/inline issue卡在css问题上。浮动/内联问题
【发布时间】:2010-10-02 10:28:51
【问题描述】:

我真的被这个问题困住了。我正在处理的页面是here

something”文本是“main”内容的一部分。我希望something 从徽标的正下方开始...但我似乎不能这样做!

基本上我希望content 成为上半部分,然后main 在底部。

我不太擅长 CSS/HTML。

【问题讨论】:

    标签: html css


    【解决方案1】:
    1. 使用文档类型
    2. Clear floats.content 上添加文档类型后应用overflow:hidden 或clearfix。
    3. 可选:将 clear:both 添加到包含“Something”的 div 中

    【讨论】:

    • 尝试将overflow:hidden 添加到.content,但这会使所有徽标和内容消失。唯一显示的是“某物”
    【解决方案2】:
    <!--<div id="header">--> 
        <div class="content"> 
             <div id="logo"> 
                  <h1><a href="/">Envy Labs</a></h1> 
             </div> 
             <div class="slogan"> 
                 <p><em id="tagline">Keeping IT simple</em></p> 
             </div>
             <div class="clear:both"></div><!--Clears Floats-->
        </div> 
    <!--</div>--> 
        <div> 
             something
        </div> 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-11
      • 2011-06-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多