Anabolic Steroids: Uses, Abuse, And Side Effects
**TL;DR – The trick is to let the container keep its left‑justified flow, but override it on the element you want centered. In practice that means:**
1. **Leave your page’s normal text (or a `
`/``) with `text-align:left` (the default).**
2. **Give the specific element you want to center its own rule, casjobs.in e.g. `text‑align:center`.**
That single CSS property is all you need – no extra wrappers or floats required.
---
## 1. Why this works
- `text-align` is a *block formatting* property that only affects inline content inside the block.
- Setting `text-align:left` on a parent (or letting it be the default) keeps normal flow text left‑justified.
- Overriding it on a child element tells that child to align its own inline children to the center.
So you can have a page where everything is left, but a particular paragraph or heading is centered, all with minimal CSS.
---
## 2. Quick code snippet
```html
Centering Example
```
**Result:** Only the `` element with class `centered` will appear in the center; everything else stays left-aligned.
2. **Give the specific element you want to center its own rule, casjobs.in e.g. `text‑align:center`.**
That single CSS property is all you need – no extra wrappers or floats required.
---
## 1. Why this works
- `text-align` is a *block formatting* property that only affects inline content inside the block.
- Setting `text-align:left` on a parent (or letting it be the default) keeps normal flow text left‑justified.
- Overriding it on a child element tells that child to align its own inline children to the center.
So you can have a page where everything is left, but a particular paragraph or heading is centered, all with minimal CSS.
---
## 2. Quick code snippet
```html
This paragraph is left aligned by default.
This heading is centered!
More left-aligned text continues here.
```
**Result:** Only the `