1

我的右侧栏不在顶部。

例如,这两个页面。www.cafecartel.com

和 www.cafecartel.com.index2.php

目前网站的写法,右边栏必须这样放置:

body id="支持" div id="container1" div id="container2"

div id="header"
 ?php include("inc/header.inc"); ?
  h1 Point of Sale for Restaurants, POS Retail and Inventory by Cafe Cartel/h1
/div

div id="包装器" div id="内容"

div id="sidebar"
 ?php include("inc/sidebar_justafew.inc"); ?
 ?php include("inc/sidebar_whouses.inc"); ?
/div

div id="maincontent"


我想要的是能够将侧边栏放在主要内容下方。对于搜索引擎优化。

这是侧栏的 CSS:

侧边栏 {

float: right;
    position: relative;
    left: 178px;
    width: 166px;
    padding-top: 5px;
margin-left: -165px;
margin-bottom: 50px;
    line-height: 1.4em;
    voice-family: "\"}\"";
    voice-family: inherit;
    width: 165px;
    }

感谢所有帮助。谢谢

4

2 回答 2

1

我无法完全理解这个问题,所以如果我误解了,我提前道歉,但是要让侧边栏出现在内容旁边并让内容出现在 HTML 中的侧边栏上方,您可以将 #maincontent div 向左浮动,然后#sidebar div 正确。

#content { clear: both; }

#maincontent { float: left; }

#sidebar { float: right; }

之后你还需要清除浮动,所以我在内容 div 上添加了 clear: both。

希望有帮助!

于 2008-12-19T03:02:58.537 回答
0

cc_layout.css line: 63

#maincontent {
    margin:0;
    padding:0;
    position:relative;
    width:97%;
    float: left;
}

@Carl, the difference between the two pages (old and new) is that he has placed the sidebar HTML below the maincontent (new) compared to above (old).

于 2008-12-21T23:04:39.450 回答