Right Align the Divi Top Header Contact Info Icons

Written by Dan Mossop

The Divi Theme allows you to set a phone number and email address to be shown at the top of the header, as well as a number of social media icons. To right align these top header text and icons, you can use the following CSS:

@media only screen and (min-width: 768px) {
    #et-info { float:right !important; }
}

On mobiles it will default to a centered layout (as the standard left aligned icons do).

Enhance Your Divi Site with Dynamic Search Results

Bring instant, dynamic search results to your Divi pages with the Divi Search Results Module. This powerful module updates results live as users type, enhancing user engagement and streamlining the search experience on your site.

About Dan Mossop

Dan is a Scottish-born web developer, now living in Brisbane with his wife and son. He has been sharing tips and helping users with Divi since 2014. He created Divi Booster, the first Divi plugin, and continues to develop it along with 20+ other Divi plugins. Dan has a PhD in Computer Science, a background in web security and likes a lot of stuff, 

27 Comments

  1. Everything works great, however the email icon is showing and I only want the phone. How do I take off the email icon?

    Reply
    • Hey Kelly! To remove the email icon while keeping the phone icon displayed, you can follow the steps outlined in this post:

      Hide the Email Icon and/or Email Address in Divi

      There are options for hiding the email icon while leaving the email address visible, or hiding both the email icon and email address.

      Reply
  2. I put email and instagram icon with the code to the right. In the mobile version, however, I no longer see the Instagram icon

    Reply
    • Hi Annette, the code given in this post shouldn't affect the visibility on mobiles… However, Divi's default is that the social icons aren't shown on mobiles, so is it possible it wasn't actually showing on mobile even before the code was added? If so, this post should help with that:

      https://divibooster.com/show-divi-header-social-icons-on-mobiles-divi-2-4/

      If you're still not seeing the icon on mobile, perhaps you can send me a link so that I can take a look for you? Thanks!

      Reply
  3. It's clear, simple and effective. Thank you for sharing !

    Reply
    • You're welcome, Benoit!

      Reply
  4. Is it possible to split the mail address & phone number from social media icons, having the first on the left and the second on the right? Just using CSS?

    Thanks!

    Reply
  5. How can you center it? I tried changing right to center, but it doesn't work. Thanks!

    Reply
    • Nevermind, I found a way.

      Reply
  6. Worked great for me. Thanks!

    Reply
  7. its not working for me :(

    Reply
    • Hi again favi, hopefully pasting the CSS into Divi's custom CSS box will get it working for you, but if not perhaps you can send me a link to the site you're working on so that I can take a look? Thanks!

      Reply
  8. Hi, is it possible to remove phone icon and keep e-mail icon only?

    I only have e-mail address, but when I add my e-mail to Header Elements, the phone icon will also appeared, is there any way I can remove it?

    Reply
  9. Thank you =) Ahhh… much better ;)

    Reply
  10. Never mind, found it already :-)

    Reply
    • where?

      Reply
      • Hi favi, there are a few options for adding the CSS to Divi. The easiest is probably to paste it at the end of the custom CSS box located at "Divi > Theme Options > General > Custom CSS".

        This post describes in more detail some of the options:

        https://divibooster.com/adding-css-to-the-divi-theme/

        Reply
  11. Hi, where do I need to paste that piece of code?
    Regards,
    Arjan

    Reply
  12. Thank you! But could you edit, please, you missed the semicolon.

    Reply
    • Hey Vsevolod, are you talking about a semicolon on the end of "float:right !important"? Technically it's optional as CSS only requires semi-colons to separate declarations, not to terminate them. But it's considered good practice to include a terminating semi-colon so I've update the post. Thanks for pointing it out!

      Reply

Submit a Comment

Comments are manually moderated and approved at the time they are answered. A preview is shown while pending but may disappear if your are cookies cleared - don't worry though, the comment is still in the queue.

Your email address will not be published. Required fields are marked *.

We may earn a commission when you visit links on our website.

Latest Posts

Hide the Page Title in the Hello Elementor Theme

Hiding the page title in the Hello Elementor theme allows you to create a cleaner and more customized page layout, free from default headings that may not fit your design. This is particularly useful for landing pages or custom content layouts where the default page...

How to Hide a Divi Module When Scrolling Up or Down

In this quick tutorial, I’ll show you how to hide a Divi module when scrolling in a specific direction (up or down), so that the module only shows when you want it to. This is especially useful when using Divi’s Scroll Effects feature and you have a effect you want to...

Fade a Divi Image Module Edge into the Background

Want to create a stylish fade effect on your Divi image module—where one side fades smoothly into the background? With a bit of CSS, you can make any edge (or corner) of the image fade out: top, bottom, left, right, or even diagonally.Fade a Divi Image Module Edge...

Hide the Header and Footer in the Hello Elementor Theme

Removing the default header and footer from your Hello Elementor theme allows for a streamlined and distraction-free website design. This is especially useful when creating unique landing pages, full-width layouts, or custom headers and footers with a page builder. In...

Setting up the Divi Password Box Module

Setting up password protection on a page can help you control access to sensitive or private content in WordPress, allowing only authorized visitors to view certain sections. With the Divi Password Box module, you can replace the plain Divi password form with a fully...

Random Posts