CSS Text Alignment and Text Direction
In this chapter you will learn about the following properties:
text-align
text-align-last
direction
unicode-bidi
vertical-align
Text Alignment
The text-align
property is used to set the horizontal alignment of a text.
A text can be left or right aligned, centered, or justified.
The following example shows center aligned, and left and right aligned text (left alignment is default if text direction is left-to-right, and right alignment is default if text direction is right-to-left):
Example
h1 {
text-align: center;
}
h2 {
text-align: left;
}
h3 {
text-align: right;
}
When the text-align
property is set to “justify”, each line is stretched so that every line has equal width, and the left and right margins are straight (like in magazines and newspapers):
Example
div {
text-align: justify;
}
Text Align Last
The text-align-last
property specifies how to align the last line of a text.
Example
Align the last line of text in three <p> elements:
p.a {
text-align-last: right;
}
p.b {
text-align-last: center;
}
p.c {
text-align-last: justify;
}
Text Direction
The direction
and unicode-bidi
properties can be used to change the text direction of an element:
Example
p {
direction: rtl;
unicode-bidi: bidi-override;
}
Vertical Alignment
The vertical-align
property sets the vertical alignment of an element.
Example
Set the vertical alignment of an image in a text:
img.a {
vertical-align: baseline;
}
img.b {
vertical-align: text-top;
}
img.c {
vertical-align: text-bottom;
}
img.d {
vertical-align: sub;
}
img.e {
vertical-align: super;
}
40 Responses
buy levofloxacin 250mg levofloxacin 500mg for sale
purchase spironolactone for sale cheap valtrex 1000mg order diflucan 100mg generic
buy ampicillin 250mg pill ampicillin 500mg ca purchase erythromycin online cheap
order fildena 100mg online cheap bimatoprost usa robaxin online buy
order suhagra 100mg sale order estrace pills estradiol 2mg ca
lamotrigine 50mg price mebendazole 100mg oral buy retin gel generic
order tadalafil online cheap buy tadacip pills cost diclofenac 50mg
generic accutane accutane 20mg uk zithromax 250mg generic
order indomethacin 50mg pill suprax 100mg cost order generic trimox
buy arimidex pills order arimidex 1mg sale order generic sildenafil
cialis 20mg sans ordonnance en pharmacie acheter gГ©nГ©rique tadalafil en france viagra 200mg pas cher
deltasone 5mg without prescription purchase prednisone online sildenafil pills 25mg
tadalafil 10mg kaufen cialis kaufen ohne rezept sildenafil für männer
isotretinoin 10mg brand oral isotretinoin 10mg ivermectin uk buy
buy doxycycline 200mg for sale buy doxycycline pills furosemide 100mg over the counter
ramipril 5mg for sale cheap clobetasol astelin 10 ml uk
purchase catapres for sale purchase meclizine online cheap buy tiotropium bromide 9 mcg pill
buspar 10mg cheap buy buspirone without prescription cheap ditropan
order terazosin 5mg pills order pioglitazone sale azulfidine 500mg cost
buy alendronate 35mg pill fosamax without prescription buy famotidine 40mg online
order olmesartan 20mg cost divalproex 250mg acetazolamide us
prograf brand ursodiol 300mg for sale urso usa
imdur order oral imdur 40mg order telmisartan 20mg pill
order zyban 150mg online order zyrtec 5mg online cheap quetiapine 100mg cheap
molnupiravir 200mg uk omnicef 300 mg uk lansoprazole 15mg tablet
buy imuran generic sildenafil pills 50mg sildenafil 25 mg
tadalafil online order order prozac online sildenafil 50mg uk
levitra or cialis buy cialis 10mg without prescription amantadine 100 mg pills
buy naltrexone pills abilify 30mg over the counter abilify 30mg drug
avlosulfon 100 mg brand cheap perindopril perindopril 8mg pill
medroxyprogesterone 5mg us buy generic biltricide 600 mg periactin brand
purchase modafinil online most reliable canadian online pharmacy ivermectin 6mg tablet for lice
fluvoxamine 100mg brand buy cymbalta 40mg sale glucotrol 10mg for sale
accutane cheap order isotretinoin 10mg for sale deltasone 20mg oral
piracetam without prescription buy piracetam 800mg without prescription buy sildenafil 100mg online
cheap zithromax oral gabapentin 800mg purchase neurontin sale
cialis prices cost cialis 40mg female viagra
generic furosemide 40mg lasix 40mg without prescription cheap hydroxychloroquine 400mg
buy tadalafil 10mg betamethasone canada purchase anafranil generic
http://edmeds.pro/# buy ed pills online