/ Published in: HTML
Applications:
1. Centered block with unknown width
2. Simple block which can have float style (f.e. horizontal menu)
1. Centered block with unknown width
2. Simple block which can have float style (f.e. horizontal menu)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
CSS: .menucenter { background:#e6eaff; border:#0dd 1px solid; margin:10px; height:30px; } .centermenu {float:left;position:relative;left:50%;} .cenmenu {position:relative;left:-50%;} *html .cenmenu {float:left;} HTML: <div class="menucenter"> <div class="centermenu"> <div class="cenmenu"> Menu (container) with float style </div> </div> </div>
URL: http://trifler.ru/blog/post_1212599291.html