How to center the block vertically in another block

Hi, guys! Please, can someone write how to center .fl and .fr vertically relative to .footer ? I used pixels to do something similar to centering, but I need to edit to center the elements.

Here is HTML:

<!DOCTYPE html>
    <meta charset="utf-8">
    <link href="./style.css" rel="stylesheet">
<div class="footer">
    <div class="fl">
        <a href="#" class="fle al">Advertising</a>
        <a href="#" class="fle al">Business</a>
        <a href="#" class="fle al">About</a>
    <div class="fr">
        <a href="#" class="fre al">Privacy</a>
        <a href="#" class="fre al">Terms</a>
        <a href="#" class="fre al">Settings</a>
        <a href="#" class="fre al">Use</a>

Here is CSS:

.footer {
    color: #666;
    background: #f2f2f2;
    border-top: 1px solid #e4e4e4;
    position: absolute;
    bottom: 0;
    font-size: 13px;
    height: 37px;

.fl {
    white-space: nowrap;

.fr {
    white-space: nowrap;

.fle {
    margin-left: 30px;

.fre {
    margin-right: 30px;

.al:hover {

a {

I’m a bit puzzled as to what this looks like. Do you have an example (image?) of what this looks like? A pencil sketch would do.

I think this needs to start again, with an actual page with some content before the footer (assuming the end product).
I don’t see how all this absolute positioning could work in the “real world”.

Like this

That’s pretty much what I’ve got using your code on Codepen, ignoring the typeface. What am I missing?

Yes, it’s like should be

Ooops, I made a typo. Not horizontally but vertically )

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.