FRONTEND Telegram 1383
#css #frontend


🎲 CSSda Divni Markazlash

Html struktura:
<div class="container">
<div class="centered-div">Markazlangan kontent</div>
</div>


1️⃣ Flexbox yordamida markazlash:
.container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}

2️⃣ Grid yordamida markazlash:
.container {
display: grid;
place-items: center;
height: 100vh;
}

3️⃣ Absolyut yordamida markazlash:
.container {
position: relative;
height: 100vh;
}
.centered-div {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

4️⃣ Margin Auto yordamida markazlash:
// Gorizontal markazlash uchun, margin: auto
.centered-div {
width: 50%;
margin: 0 auto;
}

5️⃣ Inline-block bilan markazlash:
// Inline yoki inline-block elementlari uchun
.container {
text-align: center;
line-height: 100vh;
}
.centered-div {
display: inline-block;
vertical-align: middle;
line-height: normal;
}


@frontend
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥11👍10



tgoop.com/frontend/1383
Create:
Last Update:

#css #frontend


🎲 CSSda Divni Markazlash

Html struktura:
<div class="container">
<div class="centered-div">Markazlangan kontent</div>
</div>


1️⃣ Flexbox yordamida markazlash:
.container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}

2️⃣ Grid yordamida markazlash:
.container {
display: grid;
place-items: center;
height: 100vh;
}

3️⃣ Absolyut yordamida markazlash:
.container {
position: relative;
height: 100vh;
}
.centered-div {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

4️⃣ Margin Auto yordamida markazlash:
// Gorizontal markazlash uchun, margin: auto
.centered-div {
width: 50%;
margin: 0 auto;
}

5️⃣ Inline-block bilan markazlash:
// Inline yoki inline-block elementlari uchun
.container {
text-align: center;
line-height: 100vh;
}
.centered-div {
display: inline-block;
vertical-align: middle;
line-height: normal;
}


@frontend

BY Frontend


Share with your friend now:
tgoop.com/frontend/1383

View MORE
Open in Telegram


Telegram News

Date: |

How to Create a Private or Public Channel on Telegram? To view your bio, click the Menu icon and select “View channel info.” How to create a business channel on Telegram? (Tutorial) Invite up to 200 users from your contacts to join your channel Telegram offers a powerful toolset that allows businesses to create and manage channels, groups, and bots to broadcast messages, engage in conversations, and offer reliable customer support via bots.
from us


Telegram Frontend
FROM American