Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
472 views
in Technique[技术] by (71.8m points)

css - justify-content: space-between not spacing buttons

Justify-content: space-between isn't spacing the two buttons. They're side-by-side with no margin. How do I make the buttons space-between?

export const Divbuttons = styled.div`
  display: 'flex';
  flex-direction: 'row';
  justify-content: 'space-between';
  align-items: 'center';
  padding: 0px;
  position: 'absolute';
`;

export const Continue = styled.button`
  line-height: 16px;
  letter-spacing: 1.25px;
  padding: 10px 23px;
  box-sizing: 'border-box';
  position: 'static';
`;

export const Cancel = styled.button`
  line-height: 16px;
  letter-spacing: 1.25px;
  padding: 10px 23px 10px 23px;
  box-sizing: 'border-box';
  position: 'static';
`;
question from:https://stackoverflow.com/questions/65837988/justify-content-space-between-not-spacing-buttons

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

it looks like you need to remove your quotes. e.g. display: flex; instead of display: 'flex';


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...