Skip to content

Instantly share code, notes, and snippets.

@morrxy
Created February 22, 2013 08:30
Show Gist options
  • Save morrxy/5011754 to your computer and use it in GitHub Desktop.
Save morrxy/5011754 to your computer and use it in GitHub Desktop.
CSS: floatCenter.less
/*
float center,add custom css to fco1
<div class="fco fco1">
<ul class="fci">
<li class="fi">text1</li>
<li class="fi">text2</li>
<li class="fi">text3</li>
</ul>
</div>
*/
.fco {
position:relative;
overflow:hidden;
width:100%;
> .fci {
list-style: none;
padding:0;
margin: 0;
float:left;
left:50%;
position:relative;
> .fi {
float:left;
left:-50%;
position:relative;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment