Return to Snippet

Revision: 6712
at March 30, 2009 23:42 by kossmoss


Updated Code
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>

Revision: 6711
at June 10, 2008 09:06 by kossmoss


Initial Code
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">

     Меню (контейнер) с float 

    </div>
   </div>
  </div>

Initial URL
http://trifler.ru/blog/post_1212599291.html

Initial Description
Applications:
1. Centered block with unknown width
2. Simple block which can have float style (f.e. horizontal menu)

Initial Title
Centered block with unknown width

Initial Tags
css, center

Initial Language
HTML