|
3 | 3 | <head> |
4 | 4 | <meta charset="UTF-8"> |
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
6 | | - <title>Beautiful Bootstrap Page</title> |
| 6 | + <title>Bootstrap Page with Menu, Header, and Footer</title> |
7 | 7 | <!-- Bootstrap CSS --> |
8 | 8 | <link href=" https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel=" stylesheet" > |
9 | 9 | <style> |
10 | 10 | body { |
11 | 11 | display: flex; |
12 | | - justify-content: center; |
13 | | - align-items: center; |
14 | | - height: 100vh; |
15 | | - background-color: #f8f9fa; |
| 12 | + flex-direction: column; |
| 13 | + min-height: 100vh; |
16 | 14 | } |
17 | 15 | .card { |
18 | 16 | border-radius: 15px; |
19 | 17 | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); |
20 | 18 | padding: 2rem; |
21 | | - width: 100%; |
22 | 19 | max-width: 500px; |
| 20 | + margin: auto; |
| 21 | + } |
| 22 | + .header, .footer { |
| 23 | + background-color: #343a40; |
| 24 | + color: white; |
| 25 | + padding: 1rem 0; |
| 26 | + text-align: center; |
| 27 | + } |
| 28 | + .footer { |
| 29 | + margin-top: auto; |
23 | 30 | } |
24 | 31 | </style> |
25 | 32 | </head> |
26 | 33 | <body> |
27 | 34 |
|
28 | | - <div class="card text-center"> |
29 | | - <h2 class="mb-4">Stylish Form</h2> |
30 | | - |
31 | | - <!-- Text Box --> |
32 | | - <div class="mb-3"> |
33 | | - <label for="inputText" class="form-label">Text Box</label> |
34 | | - <input type="text" class="form-control" id="inputText" placeholder="Type something..."> |
| 35 | + <!-- Navigation Menu --> |
| 36 | + <nav class="navbar navbar-expand-lg navbar-dark bg-dark"> |
| 37 | + <div class="container-fluid"> |
| 38 | + <a class="navbar-brand" href="#">My Website</a> |
| 39 | + <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> |
| 40 | + <span class="navbar-toggler-icon"></span> |
| 41 | + </button> |
| 42 | + <div class="collapse navbar-collapse" id="navbarNav"> |
| 43 | + <ul class="navbar-nav ms-auto"> |
| 44 | + <li class="nav-item"> |
| 45 | + <a class="nav-link active" aria-current="page" href="#">Home</a> |
| 46 | + </li> |
| 47 | + <li class="nav-item"> |
| 48 | + <a class="nav-link" href="#">Features</a> |
| 49 | + </li> |
| 50 | + <li class="nav-item"> |
| 51 | + <a class="nav-link" href="#">Pricing</a> |
| 52 | + </li> |
| 53 | + <li class="nav-item"> |
| 54 | + <a class="nav-link" href="#">Contact</a> |
| 55 | + </li> |
| 56 | + </ul> |
| 57 | + </div> |
35 | 58 | </div> |
| 59 | + </nav> |
| 60 | + |
| 61 | + <!-- Header Section --> |
| 62 | + <header class="header"> |
| 63 | + <h1>Welcome to My Website</h1> |
| 64 | + <p>A simple Bootstrap page with a menu, header, and footer.</p> |
| 65 | + </header> |
| 66 | + |
| 67 | + <!-- Main Content Section --> |
| 68 | + <main> |
| 69 | + <div class="card text-center mt-5"> |
| 70 | + <h2 class="mb-4">Stylish Form</h2> |
| 71 | + |
| 72 | + <!-- Text Box --> |
| 73 | + <div class="mb-3"> |
| 74 | + <label for="inputText" class="form-label">Text Box</label> |
| 75 | + <input type="text" class="form-control" id="inputText" placeholder="Type something..."> |
| 76 | + </div> |
| 77 | + |
| 78 | + <!-- Drop-Down Box --> |
| 79 | + <div class="mb-3"> |
| 80 | + <label for="selectOption" class="form-label">Drop-Down Box</label> |
| 81 | + <select class="form-select" id="selectOption"> |
| 82 | + <option value="option1">Option 1</option> |
| 83 | + <option value="option2">Option 2</option> |
| 84 | + <option value="option3">Option 3</option> |
| 85 | + </select> |
| 86 | + </div> |
36 | 87 |
|
37 | | - <!-- Drop-Down Box --> |
38 | | - <div class="mb-3"> |
39 | | - <label for="selectOption" class="form-label">Drop-Down Box</label> |
40 | | - <select class="form-select" id="selectOption"> |
41 | | - <option value="option1">Option 1</option> |
42 | | - <option value="option2">Option 2</option> |
43 | | - <option value="option3">Option 3</option> |
44 | | - </select> |
| 88 | + <!-- Button --> |
| 89 | + <button type="button" class="btn btn-primary" onclick="alert('Button clicked!')">Click Me</button> |
45 | 90 | </div> |
| 91 | + </main> |
46 | 92 |
|
47 | | - <!-- Button --> |
48 | | - <button type="button" class="btn btn-primary" onclick="alert('Button clicked!')">Click Me</button> |
49 | | - </div> |
| 93 | + <!-- Footer Section --> |
| 94 | + <footer class="footer"> |
| 95 | + <p>© 2025 My Website. All Rights Reserved.</p> |
| 96 | + </footer> |
50 | 97 |
|
51 | | - <!-- Bootstrap JS and Popper.js (Optional but recommended for interactive features) --> |
| 98 | + <!-- Bootstrap JS and Popper.js --> |
52 | 99 | <script src=" https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" ></script> |
53 | 100 | </body> |
54 | 101 | </html> |
0 commit comments