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

Align items horizontally in center and right using flex/grid #2

Open
byhbt opened this issue Jun 5, 2020 · 2 comments
Open

Align items horizontally in center and right using flex/grid #2

byhbt opened this issue Jun 5, 2020 · 2 comments
Labels
Frontend SCSS, CSS...
Projects

Comments

@byhbt
Copy link
Owner

byhbt commented Jun 5, 2020

Problem:

Untitled drawing

Solution:

https://stackoverflow.com/questions/38948102/center-and-right-align-flexbox-elements

Lesson:

What is flex: 1?
What is flex-grow: 1?

@byhbt byhbt added the CSS label Jun 5, 2020
@byhbt byhbt assigned byhbt and unassigned byhbt Jun 5, 2020
@byhbt byhbt changed the title Align item using flex Align items horizontally in center and right using flex/grid Jun 6, 2020
@byhbt
Copy link
Owner Author

byhbt commented Jun 6, 2020

If we use flex then have to use padding to compensate with the right item. so finally we use grid, as the Method #5 in this link:

https://stackoverflow.com/questions/38948102/center-and-right-align-flexbox-elements

@byhbt
Copy link
Owner Author

byhbt commented Jun 6, 2020

Before i plan to use and empty div before the [1,2,3] but it seems not elegant solution,

"Do NOT use empty tags for UI effect rendering. Use CSS (especially pseudo-selectors before and after) to render those effects."

From: https://compass.nimblehq.co/development/code-conventions/html/

@byhbt byhbt added this to the First 50 issues milestone Jul 15, 2020
@byhbt byhbt added Frontend SCSS, CSS... and removed CSS labels Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend SCSS, CSS...
Projects
Learning
  
Awaiting triage
Development

No branches or pull requests

1 participant