Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS Centered #8

Closed
pakpenyo opened this issue Dec 5, 2011 · 1 comment
Closed

CSS Centered #8

pakpenyo opened this issue Dec 5, 2011 · 1 comment

Comments

@pakpenyo
Copy link

pakpenyo commented Dec 5, 2011

i have found margin-left: -490px; is not true center in my grid. Using Less Framework 4. So, i change the css

grid{

width: 992px;
position: absolute;
top: 0;
left: 50%;
margin-left: -496px; /* original -490 */
}

grid div.vert{

width: 68px;
border: none;
margin-right: 24px;
background: rgba(136,170,221,.25);
}

Try compare with Less Framework grid from http://javascriptgrid.org/ and http://arnaumarch.com/en/less-grid.html.

Thanks and sorry for my english.

@dotjay
Copy link
Owner

dotjay commented Dec 5, 2011

Hi there!

Your negative margin-left value should always be half of your grid's width. As you have changed the original width from 980px to 992px, the original 490px left margin will no longer be correct.

Hope that explains it.

@dotjay dotjay closed this as completed Dec 5, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants