S
S
Sandro_s2018-04-29 15:01:03
Google Chrome
Sandro_s, 2018-04-29 15:01:03

Why is text alignment not working in chrome?

In Firefox Developer, Mazile - everything works.
Google aligns only h1
The rest don't work, what's the problem?

spoiler
css
.article h1, .article h2, .article_img {
  text-align: center;
  
}

html
<div class="article">
  <h2>Статья 1</h2>
  <p class="article_img">
  <img src="images/article_1.png" alt="Статья 1" />
  </p>
  <p> Превью..</p>
  <p>
  <a href="article.php?id=1">Читать дальше</a>
  </p>
</div>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sandro_s, 2018-05-01
@Sandro_s

Ctrl+F5 with clearing the cache - everything helped element.style {
} appeared)

R
Roman Grinberg, 2018-04-29
@GarfieldOfficial

Your "preview" is not in the article_img class.

<p class="article_img">
  <img src="images/article_1.png" alt="Статья 1" /><br>
  Превью...
</p>

And the link should not be in the center, because you did not specify the required class for it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question