【发布时间】:2011-11-28 08:43:16
【问题描述】:
我正在尝试这样定位网站:
-------------------
{ }{ }{ }
{ }{ }{ }
-----{ }-----
{ }{ }{ }
{ }{ }{ }
-------------------
有什么想法吗?尝试左右浮动,但各个列一直环绕到中心,使我无法将中心 div 放在那里。
左右列有leftcolumn和rightcolumn类
我的代码: 左栏:
div.aside.gauche div.section.colonne.categories {
height:460px;
width:210px;
border-style:solid;
margin-top:16px;
border: 1px solid black; -moz-border-radius: 0.3em 0.3em 0.3em;
float:left;
}
div.aside.gauche div.section.colonne.commentaires {
height:85px;
width:210px;
border-style:solid;
margin-top:6px;
border: 1px solid black; -moz-border-radius: 0.3em 0.3em 0.3em;
float:left;
}
div.aside.gauche div.section.colonne.magasins {
height:321px;
width:210px;
border-style:solid;
margin-top:6px;
border: 1px solid black; -moz-border-radius: 0.3em 0.3em 0.3em;
float:left;
}
右栏:
div.aside.droite div.section.colonne.recherche {
height:460px;
width:170px;
border: 1px solid black; -moz-border-radius: 0.3em 0.3em 0.3em;
float:right;
}
div.aside.droite div.section.colonne.suivez {
height:460px;
width:170px;
border: 1px solid black; -moz-border-radius: 0.3em 0.3em 0.3em;
float:right;
}
div.aside.droite div.section.colonne.partenaires {
height:460px;
width:170px;
border: 1px solid black; -moz-border-radius: 0.3em 0.3em 0.3em;
float:right;
}
中间件
div.milieu {
float:left;
display:block;
}
【问题讨论】:
-
发布你的代码,或者做一个 jsfiddle
-
向我们展示您的 CSS。然而,在网上搜索three column layout 会对您有所帮助
标签: css html positioning