Centering Header Contact Info Text


#1

Hi aThemes,

I’m trying to center the header contact info text @ threespearsnutritional.com I suspect because I already have custom CSS in place to remove the border from the icons in the header contact area that the css may be a little different than just:

body .header-contact div {
    font-size: 14px;
    text-align: center;
}

What am I doing wrong?

Thanks


#3

Hi,

The Header Contact isn’t centered, because your Custom CSS is a little-bit wrong, you can use this Custom CSS instead:

.header-contact .container {
    width: 100% !important;
    text-align: center !important;
}

.header-contact .container div {
    display: inline-block !important;
    font-size: 14px !important;
    margin: 0 10px !important;
}

Please add the above CSS to your Child Theme’s style.css or in case you haven’t setup a Child Theme already, then you can also add the CSS to wp-admin -> Appearance -> Customizer -> Additional CSS so you won’t loose the changes after Theme or WordPress updates.

Please let me know how it works.

Kind Regards,
Csaba


#4

Worked like a charm.

Thanks Csaba. :slight_smile:


#5

Hi,

Great! You’re most welcome! If you need help with anything else, please open a new topic.

Have a nice day!

Kind Regards,
Csaba


closed #6