Automatically translated.View original post

CSS display voice narration

# Web Site Writing Basics # cssDisplay

CSS display is the feature used to define the display format of each HTML Element, which affects the placement of elements (such as newline or display) and the use of space on a web page, with popular values such as block (newline, full-width space-eating), inline (not newline-up, eat space as needed), inline-block (align in one line, but define width and height), none (hide all elements, do not eat space), as well as values for complex layouts like flex and grid.

Basic features of display:

Display: block;:

Require that the element be rendered like a block, with a new line every time and the full width possible.

The width, height, margin, and padding can be determined.

The inherent block-level element example is < div > or < p >.

Display: inline;:

Require an in-line display element, not a new line, and will only eat as much space as the element needs.

The width and height cannot be determined directly because they do not eat the full width.

The inherent inline-level element example is < span >, < a >, or < img >.

Display: inline-block;:

It's a combination of inline and block.

The elements are lined up on the same line like inline, but width, height, margin, and padding can be defined like block.

Display: none;:

Not only does it disappear from the screen, it will not consume any space on the page, as if it did not exist.

Display for complex layout arrangement:

In addition to the basic features, there are other values used for new layout arrangements:

Display: flex;:

It is used to create a Flexbox layout to place elements in one direction (row or column) flexibly.

Display: grid;:

It is used to create a CSS Grid layout that can control the placement of elements in both row and column axes simultaneously.

The display feature is very important in controlling the appearance and display behavior of elements on a web page, allowing us to create a website with good structure and an impressive user experience (UX).

2025/8/22 Edited to

... Read moreถ้าเพิ่งเริ่มทำเว็บ “display” เป็นจุดที่ทำให้หลายคนงงเร็วมาก (เราก็เคย) เพราะมันไปกำหนดพฤติกรรมการวางตัวของ element ว่าจะขึ้นบรรทัดใหม่ไหม กินพื้นที่แค่ไหน และส่งผลต่อการจัดระยะ (margin/padding) ด้วย ลองดูแนวคิด + ตัวอย่างที่หยิบไปใช้จริงได้เลย 1) display: block ใช้เมื่ออยากให้เต็มบรรทัด เวลาใช้กับ <div> หรือ <p> จะเห็นชัดว่าแต่ละกล่องจะขึ้นบรรทัดใหม่เสมอ และโดยทั่วไปจะกว้างเต็มแถว (100%) ข้อดีคือกำหนด width/height ได้เต็มที่ ตัวอย่าง: p.ex3{display:block; background-color:#f2f2f2; padding:10px;} เหมาะกับ: กล่องเนื้อหา, section, การ์ดที่ต้องการเรียงลงมาเป็นแถวๆ 2) display: inline ใช้เมื่ออยากให้อยู่ “ในบรรทัดเดียวกัน” inline จะไม่ขึ้นบรรทัดใหม่ และกว้างเท่าที่เนื้อหาต้องใช้ เช่น <span> หรือ <a> จุดที่ต้องระวังคือ inline จะกำหนด width/height ไม่ค่อยได้ (มันไม่ได้ทำตัวเป็นกล่องเต็มรูปแบบ) ตัวอย่าง: p.ex2{display:inline; background-color:yellow; padding:10px;} ทิป: padding ใส่ได้ แต่บางครั้งการดันระยะบน-ล่างอาจไม่เป็นเหมือน block 3) display: inline-block ทางสายกลางที่ใช้บ่อยมาก inline-block คือ “เรียงในบรรทัดเดียวเหมือน inline” แต่ “กำหนดขนาดได้เหมือน block” เหมาะมากกับปุ่ม, badge, กล่องเล็กๆ หลายอันที่อยากให้เรียงกัน ตัวอย่าง: span{display:inline-block; background-color:#dff; padding:10px; width:120px;} 4) display: none ซ่อนแบบไม่กินพื้นที่ ต่างจาก visibility:hidden (ที่ยังจองพื้นที่ไว้) เพราะ display:none คือหายไปเลยและเลย์เอาต์จะยุบตาม ตัวอย่าง: p.ex1{display:none;} เหมาะกับ: ซ่อน/โชว์ด้วย JS, เมนูบนมือถือ, ส่วนที่ยังไม่อยากให้แสดง 5) display: flex เมื่ออยากจัดเรียงแบบยืดหยุ่น (แถวหรือคอลัมน์) ถ้าคุณเคยปวดหัวกับการจัดให้อยู่กลาง หรือจัดให้ item กระจายเท่าๆ กัน flex ช่วยได้เยอะมาก ตัวอย่างเริ่มต้น: .container{display:flex; gap:10px;} .container .item{padding:10px; background-color:#eee;} ทิปที่ใช้บ่อย: justify-content (จัดแนวนอน), align-items (จัดแนวตั้ง) 6) display: grid เมื่ออยากทำเลย์เอาต์ “สองมิติ” grid เหมาะกับหน้าแบบตาราง/แดชบอร์ด/การ์ดหลายคอลัมน์ เพราะควบคุมทั้ง row และ column ได้พร้อมกัน ตัวอย่างเริ่มต้น: .grid{display:grid; grid-template-columns:repeat(3,1fr); gap:12px;} .grid .card{background-color:#fafafa; padding:10px;} สรุปเลือกใช้เร็วๆ - อยากให้ขึ้นบรรทัดใหม่และเป็นกล่องเต็มรูปแบบ: block - อยากให้แทรกอยู่ในบรรทัดเดียวกับข้อความ: inline - อยากเรียงต่อกันแต่ยังกำหนดขนาดได้: inline-block - อยากซ่อนและไม่ให้กินพื้นที่: none - จัดเรียงแถว/คอลัมน์แบบยืดหยุ่น: flex - ทำเลย์เอาต์เป็นตารางควบคุมสองมิติ: grid ถ้าลองทำจริง แนะนำให้เปิด DevTools แล้วสลับค่า display ดูทันที จะเข้าใจเร็วมากกว่าท่องจำ

Related posts

Five green crocheted four-leaf clover keychains are displayed on a white surface, set against a sunset beach background. Text invites viewers to pick one to crochet, offering free tutorials for Day 9/30.
This image features close-up views of crocheted four-leaf clovers, with two clovers shown on a wooden surface. Text indicates a tutorial by Macy loves Crochet.
Close-up views of a crocheted four-leaf clover are shown, along with a finished clover keychain on a wooden surface. Text mentions 'Ep 1.' and 'Gonkui' with a timestamp.
Day 9| Clover
………. #Crochettok #clover #keychain
Lemon8er

Lemon8er

12 likes

Non-phone, beginner-friendly AND work from home? Y’all better not ask me “is it legit?” or “how long they take to reply?” 😭 I’m putting you ON. Class is December 1st — if you’re tired of struggling to get hired, be there. Let’s get you a job NOW. 💻✨ #workfromhomejobs #workfromhome #nonphone
Arialle Tate

Arialle Tate

54 likes

I did not expect this to be as good as it was. I can’t believe this is my first Fall 6 star romantasy read. YOU GUYS! {Ä.D.} #bookreview #romantasy #bookrecs #5starbooks #podiumentertainmentpartner @Podium Entertainment @Sophia | Author 📚
Jaimee 🧚‍♂️ 🐉 🩵

Jaimee 🧚‍♂️ 🐉 🩵

33 likes

Powerful Websites
#fyplemon8 # #fypシ #websites #fy #websiteideas
Tha Smoke Websites

Tha Smoke Websites

238 likes

A dark blue background with the title 'CSS KNOWLEDGE TEST!' and a purple lightbulb icon. Text asks 'How many can you get right? comment your score below!' with a Lemon8 logo and username.
A dark blue background with a white box containing 'Q1: What does the CSS property justify-content: space-between; do?' and four multiple-choice options (A-D).
A dark blue background with a white box containing 'Q2: Which unit is relative to the parent element's font size?' and four multiple-choice options (A-D).
💡 Think you know CSS? Let’s find out!
💡 Think you know CSS? Let’s find out! Take this short quiz and see how many you get right 😎 Comment your score below 👇 #CodeWithAysha #CSSQuiz #LearnToCode
Aysha

Aysha

3 likes

A black and white image of an open book with text, overlaid with the white text "When it's... SPICY ARRANGED MARRIAGE ROMANCE with plot!". The bottom left corner shows "lemon8" and "@authornehenderson".
A tablet displays the book cover for "BAD PRINCESS" by N. E. Henderson, featuring a tiara and red roses. Surrounding text highlights it as a Kindle Unlimited mafia romance with banter, arranged marriage, a strong fmc, single dad, boxer, and themes of hidden knives and childhood crush.
A tablet displays the book cover for "DARK PRINCE" by N. E. Henderson, featuring a crown and golden leaves. Surrounding text describes it as Book 2, a Kindle Unlimited mafia romance with secret marriage, forbidden love, a strong fmc, and themes of possessiveness and elopement.
Full Cast Audio Narration
N. E. Henderson

N. E. Henderson

1 like

The image is a title slide for 'CSS ESSENTIALS Part 11 DISPLAY PROPERTY', introducing the concept of CSS display property as fundamental to layout. It features a question, 'Ever wonder how layout works? It starts with display'.
This image explains 'display: block', showing two 'Block element' boxes stacked vertically, each taking full width. It notes that block elements start on a new line and are used for sections, divs, and paragraphs.
The image illustrates 'display: inline', showing three 'Box' elements ('Box 1', 'Box 2', 'Box 3') sitting next to each other. It explains that inline elements' width fits their content and are used for spans, links, and small text.
CSS Display Property – Control the Layout Flow
Understanding the display property is the foundation of layout in CSS. Whether you're building buttons, sections, or full-page grids — this guide will help you choose the right type. Save and swipe through to level up your CSS skills! #CSSDisplay #LearnCSS #WebDesignTips #FrontendB
Aysha

Aysha

3 likes

HOW TO DO THE NARRATION TREND RIGHT
‼️watch FULL VIDEO on IG/TT/YT @avianale 🚨 STOP doing the narrator trend wrong. Here’s EXACTLY how I turned it into my own trailer, my story, and my announcement to purposely multi-market my life and business— ✨NOT just do the trend✨ Save this if you’re serious about making yours timeles
AVIANALE

AVIANALE

5 likes

A screenshot of a media player showing 'Currently Listening to' the audiobook 'THE DEAD DON'T SPEAK' by Aaron Olson. The cover features a full moon over a dark landscape. White headphones are visible, and playback controls show 00:13. The background is dark red.
Virtual Narration is ODD | HrrorGrl
I don’t think I like it. #horror #horrorbook
HrrorGrl 🌻

HrrorGrl 🌻

3 likes

Overwhelmed girl era is OVER!
Organizing my chaos one pastel tab at a time 🌸💛💜💚💙 If your brain is loud, this one’s for you. . #notebooktherapy #organization #creativeideas #creativesolutions #fypシ
That’s the Kie ✨ Multifaceted

That’s the Kie ✨ Multifaceted

8 likes

Powerful Websites
#cheapfinds #amazon #fyp #fyplemon8 #websites
Tha Smoke Websites

Tha Smoke Websites

282 likes

romance recs? from ME? never thought you’d see the day, huh? 📚 books mentioned: - Open Water by Caleb Azumah Nelson - You Made a Fool of Death with Your Beauty by Akwaeke Emezi - Sick Kids in Love by Hannah Moskowitz 👗💄: - dress is from @Hill House, rented from @nuuly - pink sparkly eye
Steph 📚💫

Steph 📚💫

23 likes

Voice Acting Tips
Voice Acting: A Powerful Tool in the Talent Industry Voice acting is one of the most dynamic and unique forms of performance art in the entertainment industry. Unlike on-screen or stage acting, it focuses solely on the ability to convey emotion, character, and narrative through voice alone. This
Viper

Viper

24 likes

Chinese Street Food Art: Perfect Tiramisu Made at
Experience the beauty of Chinese street food culture! In this video, a skilled night market vendor creates a stunning handmade tiramisu, layer by layer, right on the street. The detail and care make it look like a luxury café dessert — but it’s pure Chinese street food magic. 🎥 Filmed at a nig
先生 刘

先生 刘

0 likes

Chevron-Style Breadcrumb Navigation in CSS
#webdesign #codinglife #studytips #codingforbeginners #breadcrumbs
Aysha

Aysha

5 likes

Reviews of books I’ve read recently
LingLing

LingLing

8 likes

@Fraser Narration what an amazing duet couple. 😍
literary-fantasy

literary-fantasy

1 like

The image introduces a 'Modern Testimonial Slider' project, part of '30 Days of Mini Projects' using HTML and CSS. It features a sample testimonial card from Michael Johnson and highlights bringing UI to life with sliding testimonials, marking it as Day 28 with Code With Aysha.
This image defines testimonial sliders as rotating carousels for customer reviews. It showcases an example testimonial from Ana Garcia and lists benefits like saving space, modern appearance, adding social proof, and enhancing UI movement.
The image explains the importance of testimonial sliders, featuring a sample testimonial from John Doe. It lists essential applications for portfolio websites, business landing pages, product showcases, course pages, and agency sites, emphasizing their role in building trust.
How to Build a Testimonial Slider Using HTML & CSS
Day 28 — Modern Testimonial Slider Today we’re building a clean, responsive testimonial slider using only HTML + CSS. Smooth animations, auto-slide effects, and a modern card UI — perfect for portfolios, business websites, and landing pages #webdevelopment #carouselsliders #codewithaysha
Aysha

Aysha

5 likes

The image introduces "HTML + CSS IN ACTION: 30 Days of Mini Projects Modal Popup," showcasing a modal example with text "This is a Modal" and an "Open Modal" button. It highlights "Pop up power—no JavaScript needed" for Day 23, by Code With Aysha.
This image defines a modal popup as a small overlay that captures user attention and "locks" the screen. It displays a side panel with "Quick Settings" including Dark Mode, Font Size, Accent Color, Animations, Notifications, and Quick Links.
The image explains why building modals with HTML + CSS matters, demonstrating a "Page" and an "Overlay + Centered Card" modal. It emphasizes learning CSS selectors, visibility control, layering, transitions, and responsive centering without JavaScript.
Build a Sleek Slide-in Side Panel with HTML CSS
Build a modern slide-in side panel using only HTML and CSS! Perfect for quick settings, theme controls, and navigation links. Fully responsive and beginner-friendly — no JavaScript required. #HTMLCSS #WebDesign #FrontendDevelopment #codewithaysha
Aysha

Aysha

5 likes

Narration only find
#bookbrats #bookgirlie #romantasybooks #romantasy #bookreccomendation
Beth Bratten

Beth Bratten

2 likes

Don’t Let Bad SEO Haunt Your Store This Halloween
When Halloween hits… bad SEO can haunt your Shopify store. No structured data. No rich snippets. No visibility. But with noryX, your storefront gets optimized in minutes, product pages, collections, cart, all SEO-ready. 🕸️ Your traffic won’t stay buried for long. This Halloween, don’t get g
amazthemarketer

amazthemarketer

0 likes

I think I should get back behind the camera
Sammy Taylor

Sammy Taylor

0 likes

A cover image for an HTML + CSS project titled 'Parallax Sunset Mountains', featuring a stylized sunset with dark mountains and trees, highlighting it as 'Day 27' of mini-projects by Code With Aysha.
An explanation of the parallax effect, defining it as layers moving at different speeds during scrolling to create depth, motion, and a realistic 3D look using pure CSS, with an example of mountains.
An illustration detailing the anatomy of a parallax scene, showing sun/sky as the back layer, distant mountains as the mid layer, trees as the front layer, and birds as foreground animation.
Parallax Sunset Mountains (HTML + CSS Project)
In this mini-project, we create a beautiful parallax landscape using pure HTML + CSS — no JavaScript needed. The scene includes: 🌞 glowing sunset ⛰️ layered mountains 🌲 dark forest silhouette #HTMLCSS #Parallax #WebDesign #codewithaysha
Aysha

Aysha

4 likes

The image introduces a comparison between CSS Grid and Flexbox, asking 'Which one should you use?'. It features the CSS logo, a 2x2 grid layout, and a horizontal row layout, prompting users to swipe for key differences.
This image explains the basics of CSS Grid and Flexbox. It shows a 2x2 grid layout for Grid and a horizontal row layout for Flexbox, defining Grid as two-dimensional and Flexbox as one-dimensional, with a rule of thumb for their use.
The image details when to use CSS Grid, providing a code example for a responsive layout. It lists best uses for full-page layouts, when both rows and columns are needed, for strict structures, and complex grids like dashboards.
CSS Grid vs. Flexbox: When to Use Which?
Ever wondered when to use CSS Grid and when to use Flexbox? 🤔 Both are powerful layout tools, but they serve different purposes! 🔹 CSS Grid → Best for structured, two-dimensional layouts (rows & columns). 🔹 Flexbox → Best for one-dimensional layouts, perfect for dynamic row or column alignm
Aysha

Aysha

11 likes

𝗦𝗲𝗿𝘃𝗶𝗻𝗴 possessive 𝗴𝗼𝗹𝗱𝗲𝗻 𝗿𝗲𝘁𝗿𝗶𝗲𝘃𝗲𝗿 𝗳𝗮𝗸𝗲 𝗯𝗼𝘆𝗳𝗿𝗶𝗲𝗻𝗱 𝗮𝗻𝗱 𝗻𝗼 𝘁𝗵𝗶𝗿𝗱 𝗮𝗰𝘁 𝗯𝗿𝗲𝗮𝗸𝘂𝗽 💕 ••••••••••••••••••••• 📚: Here For The Cake is a spicy, sassy, and swoony laugh out loud romantic comedy. Available in all formats, including the most amazing duet narration!! 𝗧𝗿𝗼𝗽𝗲𝘀: 🏝️ fake dating 🏝️ one be
Author Jennifer Millikin

Author Jennifer Millikin

1 like

This image introduces Day 2 of "HTML + CSS IN ACTION: 30 Days of Mini Projects," focusing on "Buttons with Hover Effects." It emphasizes making buttons interactive with CSS, presented by Code With Aysha.
This image illustrates the importance of hover effects by comparing a plain button to one with a hover glow. It explains that hover effects make website buttons interactive and engaging.
This image presents code for creating a button with hover effects. It includes basic HTML for the button and CSS styles for its appearance, along with a purple background and scale transform on hover.
Day 2: Buttons with Hover Effects | HTML + CSS
Welcome to Day 2 of HTML + CSS in Action! 🚀 Today we’re transforming a plain HTML button into an interactive button with hover effects using CSS. A simple touch that makes your websites feel alive and professional! #HTMLCSS #CodingForBeginners #MiniProjects #hoverbutton #codewithaysha
Aysha

Aysha

8 likes

See more