Rolling Your Own Grid Layouts on the Fly Without a Framework
designshack.co.uk
Rolling Your Own Grid Layouts on the Fly Without a Framework
1–8 of 8 posts
Re: Rolling Your Own Grid Layouts on the Fly Without a Framework
#2 @space: 10px;
@block: 60px;
.block-width ( @blocks ) { width: (@block * @blocks) + ((@blocks - 1) * (@space * 2) ); }
I consider this to be the canonical piece on grid-based design:Re: Rolling Your Own Grid Layouts on the Fly Without a Framework
#3Re: Rolling Your Own Grid Layouts on the Fly Without a Framework
#4Re: Rolling Your Own Grid Layouts on the Fly Without a Framework
#5Pretty sure you can't have a width of 222.75px, it would be rounded up to the nearest pixel and wouldn't fit in the container.
http://stackoverflow.com/questions/4308989/are-the-decimal-p...
Re: Rolling Your Own Grid Layouts on the Fly Without a Framework
#6I know it's popular to be a contrarian, but for us non web designers who occasionally need to do page layout, the 960 Grid generator at http://grids.heroku.com/ is great. It doesn't suffer from the the cons that the author mentions - mainly bloat and overreach.
http://www.1kbgrid.com/css/grid.css - 960px example
Re: Rolling Your Own Grid Layouts on the Fly Without a Framework
#7FYI, excluding IE6, :first-child pseudo-class is universally supported. That would be a cleaner way to handle this rather than manually adding a class to the markup.
Re: Rolling Your Own Grid Layouts on the Fly Without a Framework
#8I did this recently. I ended up using lesscss for the gory details: @space: 10px; @block: 60px; .block-width ( @blocks ) { width: (@block * @blocks) + ((@blocks - 1) * (@space * 2) ); } I consider this to be the canonical piece on grid-based design: http://www.slideshare.net/riomusi/grids-are-good-2593754