How can I alter the color of the top bar in Foundation framework?

Hey there! I'm relatively new to using Foundation and I've been trying out different solutions I found online for various issues, but I'm still struggling with this one. The section highlighted in red just won't change to the same pink color as the rest of the design.

I managed to get the code working for all the drop downs, except for the small rectangle on the left that remains unaffected.

I came across a snippet of code from another user's question on StackOverflow and made some modifications...

.top-bar {
    background: #FF859C !important;
}

.top-bar-section li a:not(.button) {
    background: #FF859C !important;   
}

.top-bar-section li a:not(.button):hover {
    background: #BCD955 !important;   
}

.top-bar-section ul li.active > a {
    background: #FF859C !important;   
}

But it doesn't seem to be working for that particular rectangle. That was the only part I edited, but I can't seem to make it apply to that element.

Good news! I can now share images!

![enter image description here][1]

Just as I was getting ready to show you the code, I managed to fix it myself. Thank you for prompting me to delve deeper into the issue!!

Instead of copying the code from Foundation's website, I found it within my default Foundation CSS file.

 @media only screen and (min-width: 40.063em) {
  .top-bar {
    background: #016B98;
    overflow: visible; }
    .top-bar:before, .top-bar:after {
      content: " ";
      display: table; }
    .top-bar:after {
      clear: both; }
    .top-bar .toggle-topbar {
      display: none; }
    .top-bar .title-area {
      float: left; }
    .top-bar .name h1 a {
      width: auto; }
    .top-bar input,
    .top-bar .button,
    .top-bar button {
      font-size: 0.875rem;
      position: relative;
      top: 7px; }
    .top-bar.expanded {
      background: #333333; }

So, thank you for your assistance!

The initial background portion was what needed adjusting! For anyone else facing a similar challenge, this is the area where I struggled to change the color (insert image that I can't post due to minimum requirement!).

Once again, thank you for all your help!

Answer №1

If you want to customize the appearance of the drop-down arrow in Foundations menu, simply insert this snippet into your app.css file.

.top-bar-section .has-dropdown>a:after {
border-top-color: #57CAFF ;/*adjust this to any color you prefer*/
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: transparent;
}

Please keep in mind that if you make changes to Foundations default styles within your regular CSS file, it might be necessary to append the !important declaration at the end of your style rule.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Fontawesome is unable to update the class due to the presence of invalid characters in the string

const toggleDarkOrLight = document.getElementsByTagName('i')[0]; var toggled = false; const toggleFunction = () => { if (toggled === false) { toggleDarkOrLight.classList.remove('fa fa-toggle-off'); toggleDarkOrLight.classLi ...

Select checkboxes by clicking a button that matches the beginning of a string in JavaScript

I have a form with a list of users and checkboxes below their names. Each user has a button that should select all checkboxes assigned to them. Below is the code for the dynamically created buttons and checkboxes. The included function takes the form name ...

Targeting multiple frames in HTML

Have you ever tried clicking on a link and opening three different pages that target three different frames simultaneously? I've managed to open two separate pages targeting two distinct frames using href combined with the onclick function and locatio ...

Tips for expanding an input field to span across two td elements

I am attempting to design a simple form. The issue I am encountering involves creating an input field that spans two td's in the second row of my table. Despite using the colspan="2" attribute within the td tag, the input field does not expand over tw ...

Applying a CSS class to multiple instances of a control in ASP.NET

Incorporating the jQuery UI framework into my ASP.NET project is a current challenge I am facing. My approach involves applying CSS to the controls in order to achieve this objective. Specifically, I have multiple GridView controls that need styling. Is t ...

Solving the Issue of Assigning a Random Background Color to a Dynamically Created Button from a Selection of Colors

Trying to create my own personal website through Kirby CMS has been both challenging and rewarding. One of the features I'm working on is a navigation menu that dynamically adds buttons for new pages added to the site. What I really want is for each b ...

Discovering an HTML Element in a JavaScript Array with Specific Styling: A Step-by-Step Guide

I am in the process of developing a website that consists of different sections. The concept is simple - by clicking on a button located at the bottom of the page, it will reveal the corresponding div section. For styling purposes, I have initially hidden ...

Creating a unique Angular 2 Custom Pipe tutorial

I've come across various instances of NG2 pipes online and decided to create one myself recently: @Pipe({name: 'planDatePipe'}) export class PlanDatePipe implements PipeTransform { transform(value: string): string { return sessionStor ...

Alter numerous classifications based on varying circumstances at regular intervals

This code snippet is designed to change randomly all the <div class="percentx"> elements, for example from <div class="percent31"> to <div class="percent52"> (with values between 1-100). It works smoothly. I ...

The tab content in VerticalTab Material React UI is spilling out and overflowing

Having some trouble with this particular component. Whenever I input content larger than my Grid size, it overflows the VerticalTab section. You can see an example of this in this codesandbox. Here's what I've attempted: return ( <div cla ...

Header with a stable background image that adjusts responsively

While attempting to convert a PSD to HTML, I encountered a small issue. Please refer to the image below: https://i.sstatic.net/5KoIV.jpg As indicated by the red arrow, there is a blue background image in the header of the template! How can I add this bac ...

Error in line 36: firebase.auth function is undefined

Snippet of index.html code <html> <head> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" ...

What is the method for incorporating more outer space into an inline SVG?

I have a situation where I am using an inline SVG with a transparent fill and a dark stroke. The aim is to change the fill color to dark when hovered over. However, increasing the stroke-width to make the stroke more visible causes it to extend beyond the ...

Event Listener for Spelling Quiz Buttons: Check Correct and Incorrect Answers

I am currently in the process of developing a spelling quiz for a project website using HTML, CSS, and JavaScript. The idea is to present the user with a word that has two missing letters indicated by underscores. The user then selects the correct answer ...

Is the Foundation Orbit image slider experiencing technical difficulties?

Hey there, I've been experimenting with Foundations Orbit media container to create an autoplay image slider using HTML and CSS. While I'm more comfortable with HTML/CSS than JavaScript, I have struggled to find a simple and cost-effective soluti ...

Transforming jQuery into pure Javascript code

UPDATE SUCCESS! I've cracked the code. The solution was to include jQuery by adding it in Joomla through the template/index.php file with this line under "//Add Javascript Frameworks" JHtml::_('jquery.framework');. PROGRESS I'm seekin ...

Struggling to properly implement background images in a React application using Tailwind CSS

I'm currently developing a React application using Tailwind CSS for styling. In my project, I have an array of items called "trending," and I'm attempting to iterate through them to generate a series of divs with background images. However, I am ...

How can I adjust the positioning of labels in Semantic UI React?

Has anyone successfully changed the label position from right side to left? I attempted using float: left but it didn't have any effect. import {Radio } from "semantic-ui-react" <Radio label="in progress" toggle /> https://i.sstatic.net/hNGb6. ...

Removing data from database with ajax

I am encountering an issue with deleting records from my database using ajax and jquery. When I click the button, nothing happens. Here is the relevant css code: <button class='delete_p' id_p='<?php echo $post_id; ?>'>x< ...

Different from Local system, the code refuses to work when deployed on the server

I have implemented a basic form where onSubmit it collects the values and passes them to a JavaScript page (via an AJAX call), then sends the data to add.php and returns the result back to the HTML page. The code functions correctly on my local system, but ...