Skip to content Skip to sidebar Skip to footer

Trouble Styling Li And Span - Margin / Padding / Positioning

I have my theme's pagination links set in a div within a div. Ideally, the pagination link div should be centered both vertically and horizontally, and the li elements should align

Solution 1:

change these

#blog .pagination ul { 
    background: #fff;
    display:inline-block;
    padding: 15px;
    margin-top: 60px;
}
#blog .pagination ul li {
    display: inline-block;
}

that should do it


Solution 2:

Here is one option:

#blog .pagination ul {
    background: #FFF;
    display: table;
    border-spacing: 15px;
        margin: 0 auto;
}

#blog .pagination ul li {
    display: table-cell;
}

#blog .pagination span.right-arrow {
    background: url('img/arrow_right.png') no-repeat 0 50%;
}

#blog .pagination span.left-arrow {
    background: url('img/arrow_left.png') no-repeat 0 50%;
}

As noted, though, you MUST include a doctype at the top of your pages. E.g. add this to the very top of your templates:

<!DOCTYPE html>

Post a Comment for "Trouble Styling Li And Span - Margin / Padding / Positioning"