Skip to content

Docs(MD): Added interview questions and answers #19

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

Merged
merged 1 commit into from
May 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 72 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2888,7 +2888,78 @@ h1 + p {
</details>

<details>
<summary>68. ???</summary>
<summary>68. Як створити sticky footer за допомогою CSS?</summary>

#### CSS

- Щоб створити sticky footer (футер, що прилипає до низу сторінки, навіть якщо контенту мало), можна скористатися Flexbox-макетом. Це сучасний, простий і стабільний підхід.

#### ✅ Готове рішення з поясненням:

```html
<!DOCTYPE html>
<html lang="uk">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sticky Footer</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

html,
body {
height: 100%;
}

.layout {
min-height: 100%;
display: flex;
flex-direction: column;
}

.main {
flex: 1;
}

.footer {
background-color: #333;
color: white;
padding: 20px;
text-align: center;
}
</style>
</head>
<body>
<div class="layout">
<main class="main">
<p>Контент сторінки (може бути короткий)</p>
</main>
<footer class="footer">
<p>Я — футер. Я завжди внизу!</p>
</footer>
</div>
</body>
</html>
```

#### 🧠 Як це працює:

- html, body → мають height: 100% — дозволяє контейнеру .layout зайняти всю висоту.

- .layout → display: flex; flex-direction: column — компоненти йдуть вертикально.

- .main → flex: 1 — займає всю доступну висоту, «виштовхує» футер вниз.

- .footer → автоматично лишається внизу, навіть коли мало контенту.

</details>

<details>
<summary>69. ???</summary>

#### CSS

Expand Down