Skip to content

Instantly share code, notes, and snippets.

@iam-gopi
Created May 15, 2025 03:07
Show Gist options
  • Save iam-gopi/afedde6c2a75dc45162aa551929db3f2 to your computer and use it in GitHub Desktop.
Save iam-gopi/afedde6c2a75dc45162aa551929db3f2 to your computer and use it in GitHub Desktop.
HTML & CSS Flex box
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Learning CSS</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<section>
<button>1</button><button>2</button><button>3</button><button>4</button>
</section>
</body>
</html>
/* section {
border: 1px solid red;
display: flex;
flex-direction: row;
/* width: 50px; */
/* flex-wrap: wrap; */
/* height: 200px; */
justify-content: row;
/*main axis */
/* align-items: center; cross axis */
/* align-content: space-between; */
/* gap: 10px 20px;
} */
/*
button {}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment