The webpage I linked to is not displaying the intended effects I added

I noticed that the links I created are still showing in the default color scheme

nav ul li a{
    color: #white;
    text-decoration: none;
    font-size: 18px;
    position: relative;
}
nav ul li a::after{
    content: '';
    width: 0;
    height: 3px;
    background: #d6799e;
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: 0.5s;
}
nav ul li a:hover:after:{
    width: 100%;
}

Despite my efforts, I am unable to change the default link colors

Answer №1

To change the color in CSS, simply remove the pound sign (#) like this:

nav ul li a{
    color: white;
    text-decoration: none;
    font-size: 18px;
    position: relative;
}

The # symbol is only necessary when using HEX colors such as #FFFFFF or #000000. Learn more about HEX colors here.

Wishing you a wonderful day!

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

Having trouble displaying CSS background images on hyperlinks

Hello everyone! I am in need of some assistance with a problem I'm facing. When I view my web page on my local computer, everything appears correctly with the images showing up. However, once I upload the web page to a server, the images no longer ap ...

Creating a New Row in an HTML Table

Can someone provide guidance on how to insert a new row into an HTML table? I'm looking to have the first column contain a selection tool, and the second column hold a text box. Ideally, there would be a button below the table that, when clicked, add ...

Implementing a JavaScript function that uses the AJAX method to confirm and update

I am currently attempting to update a database using the JavaScript confirm() function in combination with AJAX. My goal is to have "accepted_order.php" run if the user clicks "OK," and "declined_order.php" run if the user clicks "Cancel," all without caus ...

Preventing the page from refreshing when submitting a form

I'm trying to implement a form with a checkbox that functions as a toggle switch. Here's the code I have so far: <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style ...

Creating separation between a dropdown menu and its corresponding button

I'm dealing with a situation where I have a button that reveals a hidden droplist upon hover. The problem is that there is no space between the button and the droplist, causing interference with the functionality. My attempt to create some distance b ...

Guide to using Vue.js and Vue Router to create a sub menu for the children of the current route

I am currently working on customizing the navigation for my Vue application. My goal is to create a main menu at the top that displays all the root level routes, and a side menu that appears when navigating through child routes. Here is an example of what ...

Develop a novel function

I am working on a new Order page where users can select a category, then a service, and fill out the quantity field for their order. I have an idea to create a function using @if and @else statements. In this function, I want to display the quantity fiel ...

Adjust text placement with Image resizing using CSS and HTML

I've spent countless hours on this task, scouring through over 20 articles, and I am still at a loss on how to proceed. My expertise lies in designing backgrounds, where I carefully position text in specific locations. However, when I view the design ...

Encountering a blank response object when making a POST request with the fetch API

I'm new to working with express/Node.js. I recently attempted to send a request including the current user's location (longitude and latitude using the geolocation API). /public/index.html <!DOCTYPE > <html> <head> <me ...

Having trouble getting flex-wrap to function properly on my div element

For the 928px breakpoint, my aim is to: Have my right column (.vd-right-col) positioned at the bottom of the page. (I attempted to achieve this using flex-wrap:wrap; but it did not work.) Arrange the two images in this column side by side. Unfortuna ...

Converting Interfaces from Typescript to Javascript

Can the interface in typescript be converted into Javascript? If so, what is the process for converting the typescript code shown below into Javascript. interface xyz{ something? : string, somethingStyle? : Textstyle } ...

Combine all the HTML, JavaScript, and CSS files into a single index.html file

So here's the situation - I am utilizing a C# console application to convert four XML files into an HTML document. This particular document will be circulated among a specific group of individuals and is not intended to be hosted or used as a web app; ...

Challenges with Implementing Slide Out Menus

Creating a page with multiple slide out menus- one on the right, left, and bottom. Currently facing a few issues: The content div is not moving to the right when the menu is selected. The menu icon moves but the div stays put. Attempting to have them bot ...

"Encountering an error: invalid CSRF token in Node.js csurf

I have been utilizing the npm module csurf to generate a token. Initially, I retrieve the token from the server and then utilize it for the /register request. When I replicate these steps in Postman, everything seems to function correctly, but unfortunatel ...

Connecting two distinct HTML pages to two disparate CSS files

Recently, I encountered an issue while working on my website in Dreamweaver. The problem arose when trying to link a CSS file to an HTML page. While the index.html page was successfully linked to style.css and displaying correctly, the Products.html page ...

Unleashing the Potential: Integrating a Scanner Device with

Currently, I'm facing the challenge of integrating a Scanner device with my Angular application. On one of the pages dedicated to scanning, users are able to view an alert indicating the connection status of the Scanner as well as any scanned document ...

`meteor.js and npm both rely on the fs module for file

I'm feeling a bit lost, as I need to use the fs package with Meteor.js framework. Starting from meteor version 0.6 onwards, I know that I should use Npm.require in the following way: var fs = Npm.require('fs'); However, when I try this, a ...

Using CodeIgniter, input information into a textbox and verify if there is a corresponding record in the database when submitting

Working on a CodeIgniter project, I am faced with the task of adding information to a form within my view page called meal_add.php. Below is the form structure: <div id="content" class="box"> <form action="<?php echo base_url(); ?>index ...

Troubleshooting my HTML5 local storage issues for optimal functionality

I've been working on using HTML5's localstorage to save two variables and load them upon page refresh, but I seem to be encountering some issues when trying to load the saved items: Variables in question: var cookies = 0; var cursors = 0; Savi ...

Troubleshooting the Problem with CSS Margin in HTML Footer

I'm encountering an issue with the footer on my website. The margin: auto; command doesn't seem to be working for the list items in the footer. I want the items in the footer to occupy one-third of the width, but no matter where I place the marg ...