views:

36

answers:

1

I've got some problems while trying to lay out my site. I'm using Blueprint Framework and it happens when I apply borders to my div. Since their width are controlled by span-XX (or grid-xx as I noticed in 960gs), the moment I apply borders to any div element I have it goes out of the grid as seen in these images out Click to zoom alt text Click to zoom

The only way I know to fix it is to change element's width, but then the framework's grid purpose finishes 'cause I won't have the span-XX classes anymore. Is there any other way to fix it?

+2  A: 

If I understand it right, you have a span-24 or something similar and want to add a border to it, right? My preferred way of doing it is

<div class="span-24">
    <div class="box">here</div>
</div> 

and add the border to the box class for above snippet.

Teja Kantamneni
Second this. You can always change the width of the element in the framework, but this just leads to problems in the end sometimes when trying to maintain multiple versions with and without borders. Nesting div's is technically a little nasty, but then again grid frameworks are built more for prototyping than production use. Teja has the general recommended solution.
Jervis
Won't It have a line-break in this case for the first example?
Rodrigo Alves
I wiped out the `span-24` class from the inner div and did as you said but the bordered div appears with 1px height. The div inside it (which contains the input and the button) appears correctly
Rodrigo Alves