Is there anyway to give a div the “grid” option in jQuery? I don’t want to draw a grid on the div itself.
The idea is for smaller layers to snap into the bigger div, in a grid like manner.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
if you asking to build a grid within a div, then you can accomplish this with CSS alone. There is a CSS template called 960 that lays out a page with grid in 12px or 16px increments and will take care of alignment and spacing.
This will help you accomplish your goal of the “snap-to” functionality as any element placed in the columns will adhere to the rules of the container div.
At the site is a link to a grid generator where you can play with the widths of the grid system and preview the results.
WARNING: Once you layout your pages with a CSS Grid you are in danger of wanting to fore go the use of tables, as the CSS is easier to manipulate and with a system like 960 you have cross browser support out of the box. This can be a good thing!