My client wanted a call-to-action (“CTAˮ) button above the traditional navigation bar and my WordPress theme (Divi) didn’t easily support a widget in the header area. My solutions was to transform So I a menu item into a CTA button by using CSS.

Here’s how it looks

Link to the UB Foundation website.

How To

Start by adding a regular navigation link to the main menu. I added mine as the last menu item and identified it with a unique CSS class name: ubf-info-for-staff. This is so I can target this specific menu link with CSS.

Note: If you don’t see the option to enter an optional CSS class name on a menu item, go to the top of the Menu page, click Screen Options. Make sure the CSS Classes option is checked.

Now Add the CSS Magic

Include this CSS in your WordPress child theme.

  • Lines 13-18: Moves this menu item relative to its default position within the navigation using left and top attributes.
  • Lines 20-30: Gives it a rounded button style.
  • Lines 32-36: One additional tweak was to make the INFO FOR text a little heavier weight  (700).
/*  
        ___  __      ___  __   __      __  ___       ___  ___ 
| |\ | |__  /  \    |__  /  \ |__)    /__`  |   /\  |__  |__  
| | \| |    \__/    |    \__/ |  \    .__/  |  /~~\ |    |    
                                                              
     Special info-for-staff menu item
      - On non-mobile menu, move it up out of main nav bar
        so it appears to the right of the logo area

*/
@media only screen and ( min-width:981px ) {

  .ubf-info-for-staff {
    position:relative;
    left: 90px;
    top: -70px;
    z-index:9999;
  }
  
  .ubf-info-for-staff {
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
    border-radius: 10px;
    background-color: #666;
    color: #fff;
    display: inline-block;
    margin: 0 auto;
    padding: 0 !important;
    text-decoration: none;
  }
  
  .ubf-info-for-staff span { 
    font-family: 'Titillium Web', "Trebuchet MS", Arial, sans-serif;
    font-size: 11px;
    font-weight:700;
  }
  .et_header_style_centered #top-menu > li.ubf-info-for-staff > a {
    font-size:11px !important;
    line-height:1 !important;
    font-weight:normal !important;
    color: #eee !important;
    padding: 6px !important;
  }
  .et_header_style_centered #top-menu > li.ubf-info-for-staff > a:hover {
    color:#eee !important;
  }
}

Make it 280 characters less.
Make it 300 words or less.
Make it 500 words or less.
Make it 800 words or less.

a list
a table
bullet points
code
CTA
gantt chart
graphs
headers (H1, H2, H3, H4)
HTML
markdown
PDF
plain text
plain text file
questions
rich text
spreadsheet
summary
word cloud
XML

blog post
headline
essay
recipe
article
ad copy
video script
analysis
seo keywords
summary
sales copy
book outline
email
social media post
product description
meta title
meta description
outline
title
ideas
keywords
analogy

friendly
professional
authoritative
persuasive
casual
conversational
trustworthy
humorous
informal
empathetic
positive
enthusiastic
catchy
insightful
intriguing
poetic language
short sentences
formal

Assume this role

Accountant
Advertiser
Career Counselor
Chief Financial Officer
Entrepreneur
Financial Analyst
fitness instructor
Interviewer for a position
Inventor
Investment Manager
Journalist
Marketer
Mindset Coach
Project Manager
Prompt Engineer
Recruiter
Stand-up Comedian
Statistician
Abraham Lincoln
Albert Einstein
Charlie Munger
Jordan Peterson
Mario Cuomo
Mark Twain
Pope Francis
Warren Buffet
Zig Ziglar
dietician
Doctor
Lawyer
Psychologist
Therapist
Social Media Influencer
Social Media Manager
Debater
Life Coach
Motivational Coach
Motivational Speaker
Motivational Speaker
Public Speaking Coach
Al Writing Tutor
Password Generator
Smart Domain Name Generator
Tech Reviewer
Web Designer
Website Designer
Best Selling Author
Copywriter
English Pronunciation Helper
Fancy Title Generator
Ghostwriter
Plagiarism Detector
Self-Help Book
Storyteller
Tech Writer