Articles
Clinical Medicine | Feb 12, 2025
Advancements in Clinical Training
Pharmacy | Feb 10, 2025
New Drug Developments in 2025
Health Sciences | Feb 5, 2025
AI and Health Research at Kolandot
Clinical Medicine | Jan 28, 2025
Understanding Tropical Diseases
Pharmacy | Jan 22, 2025
How to Prescribe Antibiotics Correctly
Health Sciences | Jan 15, 2025
The Future of Health Education
Clinical Medicine | Jan 10, 2025
Emergency Response Training
Pharmacy | Jan 5, 2025
The Role of a Pharmacist
Health Sciences | Jan 2, 2025
Mental Health Awareness in Tanzania
Latest Articles from Kolandot College
Article on Feb 12, 2025
The Future of Clinical Medicine in Tanzania
By Dr. James K.
Article on Feb 10, 2025
Breakthroughs in Pharmacy: New Drug Developments
By Prof. Asha L.
Article on Feb 8, 2025
Improving Health Sciences Education at Kolandot
By Dr. Kennedy O.
Article on Feb 5, 2025
Understanding Antibiotic Resistance in Tanzania
By Dr. Sarah M.
Article on Feb 2, 2025
The Role of AI in Pharmacy and Medicine
By Dr. Alex D.
Article on Jan 28, 2025
How Pharmacists Can Improve Rural Healthcare
By Dr. Peter G.
Article on Jan 25, 2025
The Importance of Clinical Internships
By Dr. Lucy M.
Article on Jan 20, 2025
Common Health Misconceptions in Tanzania
By Dr. Kelvin T.
Article on Jan 15, 2025
Medical Innovations Changing Healthcare
By Dr. Naomi J.
Article on Jan 10, 2025
Essential Skills for Future Medical Professionals
By Dr. Brian N.
CSS Centering Guide
Centering things in CSS is the poster child of CSS complaining. Why does it have to be so hard?
So let’s make it a decision tree and hopefully make it easier.
I need to center...
Horizontally
Is it inline or inline-* elements (like text or links)?
Use
text-align: center;
on the parent element.Is it a block-level element?
Use
margin: 0 auto;
if it has a set width.Is there more than one block-level element?
Consider using
flexbox
or grid
for alignment.Vertically
Is it inline or inline-* elements (like text or links)?
Use
line-height
equal to container height.Is it a block-level element?
Use
flexbox
with align-items: center;
.Both Horizontally & Vertically
You can combine techniques above to get perfectly centered elements.
Is the element of fixed width and height?
Use
position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
.Is the element of unknown width and height?
Use
flexbox
or grid
.Can you use flexbox?
Set
display: flex; justify-content: center; align-items: center;
.Can you use grid?
Use
display: grid; place-items: center;
.Conclusion
CSS has many ways to center things, choose what works best for your layout.
Kolandoto College of Health and Allied Sciences
Your Source for News, Events & Articles
Latest News & Updates
Stay informed about the latest events and articles.
Latest Articles

Advancements in Medical Training
Kolandoto College introduces new simulation labs.

Health Awareness Campaign
Students take part in community outreach programs.
Quick Hits
- New semester starts on March 15th
- Guest lecture on Public Health this Friday
- Scholarship applications now open
Kolandoto College of Health and Allied Sciences
Your Source for News, Events & Articles
Latest News & Updates
Stay informed about the latest events and articles.
Collections
Classic Tricks
Timeless CSS gems
Scroll Animation
Chris Coyier
Yellow Flash
Chris Coyier
Self-Drawing Shadows
Chris Coyier
Scroll Shadows
Chris Coyier
Editable Style Blocks
Chris Coyier
Scroll Indicator
Chris Coyier