CSS: "align:center" and "align:right" not working
Question by Guest | Last update on 2021-05-14 | Created on 2016-11-01
I want to align one of my texts centered, another text should appear right aligned on my website.
For this, I have added the following CSS to the corresponding paragraph using the style attribute:
<p style="align:center">Should actually be centered...</p> <p style="align:right">Should actually be right aligned...</p>
However, this CSS does not show any effect. The text remains unchanged left aligned without any alignment, it seems as if it does not play a role whether those properties are defined or not.
What can I do to align a text in HTML with CSS?
Related Topics
Lord's Prayer in 20 other Languages
Info | 0 Comments
CSS: Include CSS Stylesheets in HTML
Tutorial | 0 Comments
Website Performance: Deliver JavaScript and CSS files compressed to reduce loading times
Tutorial | 0 Comments
jQuery: CSS Stylesheet Switcher
Tutorial | 1 Comment
Delphi: CanvasTextOut: Align Left, Right and Center
Tip | 0 Comments
Reload Images, CSS, JS and Web Pages despite Browser Cache
Tip | 2 Comments
Total Lunar Eclipses in Germany - Dates
Info | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
The CSS property you are thinking about is named "text-align".
So, you have to write "text-align" instead of "align" only:
This should work for you.
2016-11-01 at 13:20