Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Windows Tipps & SecurityThe Blood of Dawnwalker Director Says 60 FPS Is Enough for This RPG(23.09.2026 um 14:37 Uhr)
Windows Tipps & SecurityMeyer Sound ernennt John McMahon zum Chief Operating Officer(23.09.2026 um 11:19 Uhr)
Windows Tipps & SecurityTouchscreen erweitert Grill-Sortiment am Point of Sale(23.09.2026 um 13:45 Uhr)
Windows Tipps & Security„When Worlds Unite“: ISE 2027 erweitert Messe und Programm(23.09.2026 um 13:45 Uhr)
Sichere ProgrammierungWhat Full-Stack AI Engineering Means in Real Projects(23.09.2026 um 14:00 Uhr)
Sichere ProgrammierungThe Internet Changes Everything (Slowly)(23.09.2026 um 14:09 Uhr)
Sichere ProgrammierungMAUI vs React Native vs Flutter vs Ionic(23.09.2026 um 14:09 Uhr)
Sichere ProgrammierungAI Tools Used in Modern Software Development(23.09.2026 um 14:22 Uhr)
Sichere ProgrammierungHealthAuditor — Website Health & SEO Audit Tool(23.09.2026 um 14:24 Uhr)
Windows Tipps & SecurityThe Blood of Dawnwalker Director Says 60 FPS Is Enough for This RPG(23.09.2026 um 14:37 Uhr)
Windows Tipps & SecurityMeyer Sound ernennt John McMahon zum Chief Operating Officer(23.09.2026 um 11:19 Uhr)
Windows Tipps & SecurityTouchscreen erweitert Grill-Sortiment am Point of Sale(23.09.2026 um 13:45 Uhr)
Windows Tipps & Security„When Worlds Unite“: ISE 2027 erweitert Messe und Programm(23.09.2026 um 13:45 Uhr)
Sichere ProgrammierungWhat Full-Stack AI Engineering Means in Real Projects(23.09.2026 um 14:00 Uhr)
Sichere ProgrammierungThe Internet Changes Everything (Slowly)(23.09.2026 um 14:09 Uhr)
Sichere ProgrammierungMAUI vs React Native vs Flutter vs Ionic(23.09.2026 um 14:09 Uhr)
Sichere ProgrammierungAI Tools Used in Modern Software Development(23.09.2026 um 14:22 Uhr)
Sichere ProgrammierungHealthAuditor — Website Health & SEO Audit Tool(23.09.2026 um 14:24 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

CSS tutorial series: CSS Units and Sizing

Today's post will discuss length units, which you may have encountered in the previous post padding: 10px while working on the challenge. CSS uses absolute and relative units, which are the two sorts of units that are normally used for…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Today's post will discuss length units, which you may have encountered in the previous post padding: 10px while working on the challenge.



CSS uses absolute and relative units, which are the two sorts of units that are normally used for length and size.






What are Absolute units?



In general, absolute units are thought to be the same size at all times. There might be some exceptions, Depending on the size and quality of your screen or browser settings.



The most commonly used absolute length unit in CSS is pixels px.



















Unit Description
px pixels (1px = 1/96th of 1in)
pt points (1pt = 1/72 of 1in)
pc picas (1pc = 12 pt)
cm centimeters
mm millimeters
in inches (1in = 96px = 2.54cm)
Q Quarter millimeters (1Q = 1/40th of 1cm)





What are relative units?



Relative length units are defined in relation to another length property, such as parent element's font size. Relative length units scale more effectively on the page





















Unit Description
% with reference (relative) to the parent element
rem relative to the font-size of the root element which is by default 16px, 1rem= 16px
em inherits the font-size from its parent element meaning 1em = `font-size of parent element
vw view width is relative to the viewport's width
vh view height is relative to the viewport's height
ex relative to x-height (distance between baseline and mean line of a lowercase letter) or 1/2 of 1em
vmin vmin is 1% of the viewport's smallest dimension
vmax vmax is 1% of the viewport's largest dimension





Let's use examples to further clarify the ex, vh, vw, vmin and vmax relative units.






vmin & vmax



If the viewport is 900 pixels wide and 700 pixels high, the 1vmin will be 7 pixels and the vmax will be 9 pixels.



  • 1vmin = 700 -99%

    1vmin = 7 pixels


  • 1vmax = 900 -99%

    1vmax = 9 pixels





ex Unit



ex unit explained
source : Stackoverflow



As mentioned in the table ex is the distance between baseline and mean line of a lowercase letter






vh & vw



A web page's viewport is the portion that the user can see. On a mobile phone as compared to a computer screen, the viewport is smaller because it varies depending on the device.



Relative units are the most frequently used when creating a single webpage or in significant real-world projects. Using relative units for your layout maintain its stability making it less likely to break.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten CSS tutorial series: CSS Units and Sizing

Thematisch verwandte Begriffe: tutorial, series, Units, Sizing · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-5695 | Arbitrary file upload vulnerability due to a lack of proper validation in…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick