Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/79.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 将徽标向左浮动,将内容向右浮动_Css_Html_Css Float - Fatal编程技术网

Css 将徽标向左浮动,将内容向右浮动

Css 将徽标向左浮动,将内容向右浮动,css,html,css-float,Css,Html,Css Float,我有下面的HTML和CSS,其中徽标浮动在左侧,但我希望能够将内容浮动在右侧 <html> <body> <div id="logo"> <img src="images/logo.gif" height="376" width="198" alt="LOGO" title="" /> </div> <div id="maintext"> <p id="main"&g

我有下面的
HTML
CSS
,其中徽标浮动在左侧,但我希望能够将内容浮动在右侧

<html>
  <body>
    <div id="logo">
      <img src="images/logo.gif" height="376" width="198" alt="LOGO" title="" />
    </div>
    <div id="maintext">
      <p id="main">First paragraph</p>
      <p>Second paragraph.</p>
    </div>
    <footer>...</footer>
  </body>
</html>
发生的情况是,徽标“
images/logo.gif
”显示在页脚的左侧,但位于页脚的顶部。它应该显示在“maintext”选择器的左侧

有什么想法吗?

添加此CSS:

footer {
    clear: both;
}

我不太明白。。。它将是:

float: right;
float: right;