html - Set div to 100% of content -
i using 1140px fluid grid (cssgrid.net) layout.
i having problem..
my layout looks this:
side menu - content - content - content - content - etc. etc.
my problem is, layout this:
side menu - content content content content content etc. etc.
i want, "side menu" full height, push content "the right".
my layout (exist of 12 cols):
<div class="container"> <div class="row"> <div class="twocol"> -- side menu content here -- </div><!-- end 2col --> <div class="tencol last"> content content content </div> <div class="tencol last"> content content content </div> <div class="tencol last"> content content content </div> <div class="tencol last"> content content content </div> </div><!-- end .row --> </div><!-- end .container -->
the css is:
.container { padding-left: 20px; padding-right: 20px; } .row { width: 100%; /*max-width: 1140px; */ min-width: 755px; margin: 0 auto; overflow: hidden; } .onecol, .twocol, .threecol, .fourcol, .fivecol, .sixcol, .sevencol, .eightcol, .ninecol, .tencol, .elevencol { margin-right: 3.8%; float: left; min-height: 1px; } .row .onecol { width: 4.85%; } .row .twocol { width: 13.45%; } .row .threecol { width: 22.05%; } .row .fourcol { width: 30.75%; } .row .fivecol { width: 39.45%; } .row .sixcol { width: 48%; } .row .sevencol { width: 56.75%; } .row .eightcol { width: 65.4%; } .row .ninecol { width: 74.05%; } .row .tencol { width: 82.7%; } .row .elevencol { width: 91.35%; } .row .twelvecol { width: 100%; float: left; } .last { margin-right: 0px; }
i hope can me. thank you.
your layout looks way:
body +------------------------------------------------------------+ | 2 col content ten col content | | +--------------+ +---------------------------------------+ | | | | | | | | | | | | | | +--------------+ +---------------------------------------+ | | +---------------------------------------+ | | | ten col content | | | | | | | +---------------------------------------+ | | +---------------------------------------+ | | | ten col content | | | | | | | +---------------------------------------+ | | +---------------------------------------+ | | | ten col content | | | | | | | +---------------------------------------+ | | +---------------------------------------+ | | | ten col content | | | | | | | +---------------------------------------+ | | +---------------------------------------+ | | | ten col content | | | | | | | +---------------------------------------+ | +------------------------------------------------------------+
do not repeat ten col content. keep wrapper , use smaller divs. this:
body +------------------------------------------------------------+ | 2 col content ten col content | | +--------------+ +---------------------------------------+ | | | | | +-----------------------------------+ | | | | | | | | | | | +--------------+ | | | | | | | +-----------------------------------+ | | | | +-----------------------------------+ | | | | | | | | | | | | | | | | +-----------------------------------+ | | | | +-----------------------------------+ | | | | | | | | | | | | | | | | +-----------------------------------+ | | | | +-----------------------------------+ | | | | | | | | | | | | | | | | +-----------------------------------+ | | | | +-----------------------------------+ | | | | | | | | | | | | | | | | +-----------------------------------+ | | | +---------------------------------------+ | +------------------------------------------------------------+
in case if want html code,
<div class="container"> <div class="row"> <div class="twocol"> -- side menu content here -- </div><!-- end 2col --> <div class="tencol last"> <div> content content content </div> <div> content content content </div> <div> content content content </div> <div> content content content </div> </div> </div><!-- end .row --> </div><!-- end .container -->
hope helps!
Comments
Post a Comment