0
我需要像往常一样在酒吧的左侧有一些标签,并且2个标签位于酒吧的右端。如何将标签定位到标签栏的右侧?
我的jsfiddle文件是here
的标签栏必须位于屏幕的底部部分一些点。因此,我必须将其定位为绝对值。因此,我无法找到标签相对到酒吧。
我试过float:right但它也没有工作。
有什么建议吗?
我需要像往常一样在酒吧的左侧有一些标签,并且2个标签位于酒吧的右端。如何将标签定位到标签栏的右侧?
我的jsfiddle文件是here
的标签栏必须位于屏幕的底部部分一些点。因此,我必须将其定位为绝对值。因此,我无法找到标签相对到酒吧。
我试过float:right但它也没有工作。
有什么建议吗?
这是否让你走在正确的方向:
.tab-box {
margin: 0;
position: absolute; /*I need to fix these tabs at some point at the bottom part of the screen*/
bottom: 248px;
left: 0;
}
#complexTab {
width:100%;
}
.tab-box a {
font-family:Helvetica, Arial, sans-serif;
border: 1px solid #3A3D42;
color: #666666;
padding: 5px 5px;
background-color: #eee;
float:right;
-webkit-border-top-left-radius: 4px;
-moz-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
-moz-border-top-right-radius: 4px;
margin: -2px; /*remove space btw tabs*/
}
.tab-box a:first-child {
-webkit-border-top-left-radius: 0;
-moz-border-top-left-radius: 0;
}
.tabcontent {
height:248px;
margin:0;
padding:0;
overflow:hidden;
border-top:1px solid #3A3D42;
background-color:#757D8A;
box-shadow:0 1px 0 rgba(255,255,255,.3) inset;
-moz-box-shadow:0 1px 0 rgba(255,255,255,.3) inset;
-webkit-box-shadow:0 1px 0 rgba(255,255,255,.3) inset;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
}
.hiden {
display : none;
}
我想我忘了设置宽度:100%。但是,有一个小问题。当我将2个选项卡向右浮动时,左边的选项卡上升一点。这使得这些标签和内容有点小差距。你有什么想法如何解决它?谢谢, – chepukha 2011-06-16 19:44:20
你可以展示jsFiddle吗? – 2011-06-16 19:48:16
哎呀。抱歉。 [Here](http://jsfiddle.net/chepukha/jXAZx/15/)它是 – chepukha 2011-06-16 19:54:40