The Ultimate Guide to Centering in CSS
Useful, cause you can meet this question during the interview
Please open Telegram to view this post
VIEW IN TELEGRAM
Joshwcomeau
How To Center a Div • Josh W. Comeau
Back in the day, centering an element was one of the trickiest things in CSS. As the language has evolved, we’ve been given lots of new tools we can use… But how do we pick the best option? When do we use Flexbox, or CSS Grid, or something else? Let's dig…
👍26🔥8❤3
🔅 ChatGPT for Web Developers
🌐 Author: Sandy Ludosky
🔰 Level: Intermediate
⏰ Duration: 2h 29m
📗 Topics: Web Development, ChatGPT
📤 Join Webdev Training for more courses
🌀 Level up as a professional web developer by learning how to build and optimize web applications using ChatGPT.
Please open Telegram to view this post
VIEW IN TELEGRAM
👍17❤10🔥1
Please open Telegram to view this post
VIEW IN TELEGRAM
3🔥18👍13❤9
This is something that got supported by all browsers very recently!
Usually, you would use the align-content property with a flex or a grid container.
🥱 So to make some content vertically centered, you had to make the parent a flex or grid first
🤩 But no longer, the align-content attribute now works with block display items too (which is the default display type) enabling us to center items vertically in a single line!
Usually, you would use the align-content property with a flex or a grid container.
🥱 So to make some content vertically centered, you had to make the parent a flex or grid first
🤩 But no longer, the align-content attribute now works with block display items too (which is the default display type) enabling us to center items vertically in a single line!
👍28❤25
Integrating the element in your HTML forms enhances user experience by combining the simplicity of a dropdown with the flexibility of free text input, offering a powerful solution for modern combobox functionality.
Please open Telegram to view this post
VIEW IN TELEGRAM
👍29❤16
Some minor tricks for adding that ✨ pixie dust ✨ to your website!
👍31❤18🔥9
Have you ever struggled to set 100% width on an item while also setting some margin for it I'm CSS? Once you know this trick you no longer have to!
👉 The "width" we set on CSS element is applied till the border of the element (content, padding and border)
But what if we want the element to have some margin as well but still fit inside the patent?
You may try to use some 🧠 math like calc(100% - 40px), but with the "stretch" keyword for the width property, CSS automatically does this for you.
🔥 This helps to easily fit an element inside it's parent even when it has some margin!
❤33👍26🔥4
This media is not supported in your browser
VIEW IN TELEGRAM
Do you have an image that is not exactly the same size as what you want to render it as?
Just turn on the object-fit propery to cover for the image element!
This property ensures that irrespective of the dimension of the image element, the contents fully covers the element without any distortion.
👉 Without this, the content would be stretched to fit the element
Please open Telegram to view this post
VIEW IN TELEGRAM
👍57❤23🔥11
Media is too big
VIEW IN TELEGRAM
🔅 Crazy Text Animation with CSS and SVG
In this video with the topic Crazy Text Animation with CSS and SVG, I will share with everyone an extremely interesting idea to create text animation without using javascript. By combining vector SVG and CSS, we will create an extremely impressive text animation.
👍50❤20🔥9
Please open Telegram to view this post
VIEW IN TELEGRAM
❤51👍23🔥4
Media is too big
VIEW IN TELEGRAM
🔅 This CSS Property Replaces Hundreds of Lines of Code
00:00 - Introduction
00:35 - Starting Code
01:04 - field-sizing Property Basics
04:19 - Caveats
05:05 - Browser Support
00:00 - Introduction
00:35 - Starting Code
01:04 - field-sizing Property Basics
04:19 - Caveats
05:05 - Browser Support
❤36👍12🔥5