I found the reason of this wrong behavior. The elements having class "row" inherit the width from "container", as you know, but they have a negative margin-left (-20px). The negative margin-left is balanced out with the margin-left of the elements having class "span*" (20px)
In our case we had: <span12> margin-left = 20px <row> margin-left = -20px <span9> margin-left = 20px obtaining a margin-left total of 20px Removing ".span12", things are balanced out again. Therefore, as Annet noted, we have to strictly follow bootstrap layout: "span*" elements wrapped in a "row" element. Latter statement is clearly showed in "Nesting columns" paragraph at http://twitter.github.com/bootstrap/scaffolding.html#layouts Last trunk of web2py has layout.html corrected. Il giorno mercoledì 12 settembre 2012 20:48:29 UTC+2, dundee ha scritto: > > Thanks again Annet and all the others who took the time to respond to my > question. > > On Wed, Sep 12, 2012 at 11:11 AM, Annet <anne...@googlemail.com<javascript:> > > wrote: > >> @Massimo, >> >> >> aha! Thanks Annet, this fixes a long standing problem. >> >> >> Well, Anthony already mentioned the span12, I just provided my solution >> to the problem. >> >> @Dundee >> >> In an external style sheet I defined: >> >> .pad {padding: 18px;} >> .pad-hor {padding: 0px 18px;} >> .pad-vert {padding: 18px 0px;} >> >> >> I use these selectors in the following way: >> >> >> <header class="header mastheader"> >> <div class="row"> >> <div class="span12 pad"> >> </div> <!--/.span12 --> >> </div> <!-- /.row --> >> </header> >> >> >> Kind regards, >> >> Annet. >> >> -- >> >> >> >> > > > > --