KandZ – Tuts

We like to help…!

CSS 9 ๐Ÿ’ป text indent, vertical align, text align last, direction properties

text-indent โ†’ controls the  indentation to the first line of a block element
values โ†’ length values (mm, px), percentage values (%) and global values(inherit, initial etc)
example 1 โ†’ Indents the first line of text by 40 pixels
example 2 โ†’ Removes any indentation from the first line of text
vertical-align โ†’ aligns the inline/inline-block/table cell element vertically inside its parent
values โ†’ baseline, sub, super, text-top, text-bottom, middle...
top, bottom and of course length(em, px etc) and percentage values (%)
example 1 โ†’ centers the child elements vertically
example 2 โ†’ centers these elements with their parent (the .container div) vertically

text-align-last โ†’ controls the alignment of the last line of text within a block element
values โ†’ start, end, left, right, center, justify and global values(inherit, initial...)
example 1 โ†’ aligns the last line of the paragraph to the left
example 2 โ†’ aligns the last line of the paragraph to the right
direction โ†’ controls the the text direction within a block element
values โ†’ ltr, rtl and global values(inherit, initial...)
example 1 โ†’ This will make the text read from left to right
example 2 โ†’ this will make the text read from right to left

9 – text-indent, vertical-align, text-align-last, direction properties

<p class="indented">This paragraph has a left indentation of 40 pixels.</p>
<p class="no-indent">This paragraph does not have any indentation.</p>
<div class="container">
    <span class="inline">This is a span with <span style="font-size: 20px; vertical-align: top;">top</span> alignment.</span>
    <span class="inline">This is another span with middle alignment.</span>
    <span class="inline">This one has bottom alignment.</span>
</div>

<p class="left-aligned-last">This is a paragraph that will be left aligned with the last line of text. It's quite long and has a bunch of words to demonstrate how this property works.</p>
<p class="right-aligned-last">This paragraph will have its last line right aligned. Again, it is quite long and has more words than the previous one.</p>

<div class="ltr">This is a left-to-right language (e.g., English) block.</div>
<div class="rtl">This is a right-to-left language (e.g., Arabic, Hebrew) block.</div>
p.indented {
    text-indent: 40px; 
    font-size: 18px;
}

p.no-indent {
    text-indent: none; 
    font-size: 18px;
}

.container {
    display: inline-block; 
    vertical-align: middle; 
    width: 300px; 
}

.inline {
    display: inline-block; 
    vertical-align: middle; 
    margin-right: 20px; 
}

p.left-aligned-last {
    text-align: justify; 
    text-align-last: left; 
    font-size: 18px;
    border: 1px solid #ddd;
}

p.right-aligned-last {
    text-align: justify;
    text-align-last: right;
    font-size: 18px;
    border: 1px solid #ddd;
}

div.ltr {
    direction: ltr;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

div.rtl {
    direction: rtl;
    border: 1px solid #ddd;
}

Stop using slow, ad-bloated tool sites! ๐Ÿคฎ

๐Ÿ”Ž Search “KandZ Tools” on Google to use many professional utilities for free.

KandZ.me is the ultimate minimalist hub for:
โœ… Finance (Mortgage, Interest, Inflation)
โœ… Tech (Base64, JSON, Dev Suite, IP)
โœ… Health (BMI, BMR, TDEE)
โœ… Productivity (Timer, Workspace, QR)

โšก๏ธ Fast & Private
๐Ÿ”’ No data leaves your device
๐Ÿ’Ž 100% Free

๐Ÿ”— Use it now: https://tools.kandz.me
๐Ÿ”– Bookmark itโ€”youโ€™ll need it later!

Leave a Reply