0

Свойство text-align не работает

.pagiNav
{
    text-align: center;
}


.paginActive
{
    background: url(../graphic/elements/pactempty.png) no-repeat;

}
.paginAnother
{
    background: url(../graphic/elements/pempty.png) no-repeat;

}

.paginActive, .paginAnother
{
    display: table-cell;
    background-size: 100% 100%;
    min-width: 42px;
    height: 36px;

    line-height: 33px;
}

.paginAnother
{
    color: #26A313;
    text-decoration: none;
    font-weight: bold;
}

.paginFirst
{
    background-image: url(../graphic/elements/pleft.png);
}

.paginLast
{
    background-image: url(../graphic/elements/pright.png);
}
.paginFirst, .paginLast
{
    display: table-cell;
    width: 30px;
    height: 34px;
}

html

<div class="pagiNav">


    <?php if ($pagination->first_page() !== false): ?>
        <!--Ссылка перехода, на первую страницу-->
        <a href="<?= Url::super_url(['pagin' => $pagination->first_page()]) ?>" class="paginFirst"></a>
    <?php endif; ?>





    <?php foreach ($pagination->nav() as $page): ?>

        <?php if ($page == $pagination->get_page()): ?>
            <!--Активная страница в данный момент-->
            <span class="paginActive tac small"><?= $page+10000 ?></span>

        <?php else: ?>
            <!--Ссылка на другие страницы-->
            <a href="<?= Url::super_url(['pagin' => $page]) ?>" class="tac paginAnother small"><?= $page ?></a>
        <?php endif; ?>

    <?php endforeach; ?>




    <?php if ($pagination->latest_page() !== false): ?>
        <!--Ссылка перехода, на последнюю страницу-->
        <a href="<?= Url::super_url(['pagin' => $pagination->latest_page()]) ?>" class="paginLast"></a>
    <?php endif; ?>




</div>
6
  • Саму таблицу и css хотя бы добавьте для наглядности
    – Cheg
    22 июл 2017 в 6:00
  • добавил ываьруыпоаыо
    – Erepaha
    22 июл 2017 в 6:08
  • добавил ываьруыпоаыо
    – Erepaha
    22 июл 2017 в 6:08
  • А html таблицы?
    – Cheg
    22 июл 2017 в 6:08
  • Просто скажи как можно выровнять элементы table-cell в элементе table по горизонтали
    – Erepaha
    22 июл 2017 в 6:13

1 ответ 1

0

Уже решил. Свойство text-align с таблицей походу не работает. Использовал margin: 0 auto

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.