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

Fixed column #16

Open
mhulse opened this issue Jan 18, 2016 · 0 comments
Open

Fixed column #16

mhulse opened this issue Jan 18, 2016 · 0 comments

Comments

@mhulse
Copy link
Owner

mhulse commented Jan 18, 2016

/*
Calc Demo 100% Fluid Width.
--
The Width of element 1 is determined by the size of the container width, minus the spacing and width of element 2.

Useful in a responsive, re-usable widget scenario. Since the overall size is controlled by 1 container width, but adaptable to fit in any size.

*/

/* calc( 100% width - width of element 2)*/
.element-2 { float: left; width: calc(100% - 280px); }

/*Notice how calc can also account for the additioanl spacing appled via margin-left here. */
.element-1 { float: left; width: 270px; margin-left: 10px; }

h/t http://vincentp.me/blog/use-cases-for-calc/

@mhulse mhulse added the README label Mar 31, 2018
@mhulse mhulse added the Layout label Aug 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant