Working with CSS in ASP.NET is not limited to just the `<a>` tag

I encountered an issue with my CSS where it wasn't working properly. I managed to fix it by clearing the cache of my browser or using ctrl+f5. Now the CSS is functioning, but I'm facing a problem with <a> tags that have a specific class applied to them. Despite applying styles to the class in my source CSS file, these changes are not reflecting on the elements themselves.

Below is the code snippet:

<span id="togSpan"> <a clsss="navbarA" href="#">HOME</a><a clsss="navbarA" href="#">GENERIC</a><a clsss="navbarA" href="#">ELEMENTS</a> <i id="bars" class="fas fa-bars"></i><i id="times" class="fas fa-times"></i></span>

CSS:

 .navbarA {
        text-decoration: none;
        font-size: 12px;
        color: black;
    }

    .navbarA:hover {
        text-decoration: none;
        color: #8dda06;
    }

Could this issue be related to the presence of spans?

Answer №1

You mistakenly wrote clsss instead of class. The correct code is:

<span id="togSpan">
  <a class="navbarA" href="#">HOME</a>
  <a class="navbarA" href="#">GENERIC</a>
  <a class="navbarA" href="#">ELEMENTS</a>
  <i id="bars" class="fas fa-bars"></i>
  <i id="times" class="fas fa-times"></i>
</span>

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

What is the best way to include CSS styles in a React app with Webpack?

Having an issue with my React app. Upon successfully compiling Webpack and serving the content, no styles are displayed within the app. This is the current content of my webpack.config.js file: const path = require('path'); const BUILD_DIR = pat ...

What is the best way to achieve varying margins when adding divs in CSS?

Encountering CSS margin issues when adding new divs. Desiring a large margin between the Create Div button and minimal margin between Example Text Here. The desired outcome Margin is too small between Create Div button and Example Text Here, but good bet ...

What could be causing the if statement to evaluate as false even though the div's style.display is set to 'block'?

Building a react application using createreactapp and encountering an issue with an if statement that checks the CSS display property of a div identified as step1: const step1 = document.getElementById("step-1") if (step1.style.display === 'blo ...

Troubleshooting the issue: Unable to shift a div to the left in a Rails app using jQuery and CSS when a mouseover event occurs

Hey there, I'm working on a div that contains a map. My goal is to have the width of the div change from 80% to 50% when a user hovers over it. This will create space on the right side for an image to appear. I've been looking up examples of jqu ...

Achieving space between elements using Flexbox with a line separating each row

I have already found a solution to this question, but I am interested in exploring better alternatives. My goal is to utilize flexbox to create rows of items with equal spacing and dividing lines between them. The examples provided in the code snippet achi ...

I'm working in JavaFX and I have several line charts that I need to customize individually using CSS styling

Is there a way in JavaFX to style different charts individually with CSS without having the styles override all of them? I've noticed that when I change the CSS for one chart, it affects the others as well. How can I write CSS code that only applies t ...

Is it possible to move the login button to the right side of the screen?

I'm attempting to move the Login menu all the way to the right on the navigation bar. Currently, all the menu items are aligned to the left and I need to align the Login menu to the right. However, I'm unsure of where to begin. The navigation me ...

Profile picture placeholder with conditional logic

After extensively searching online, I was unable to find a solution on how to add a default profile picture. Here is the code snippet I used for uploading an image chosen by the user: <td><img class="image" src="image/<?php echo $contact[&apos ...

"Encountered a 404 Error while attempting an Ajax

I am relatively new to web development and I am currently working on making a post method function properly. Below is the ajax call that I have implemented: $.ajax({ type: "POST", url: '/Controllers/AddPropertyData', ...

How can I eliminate hyperlinks from entire cells within a table using CSS and HTML?

I'm looking to create a web page layout with a footer containing vertically aligned links. To achieve this, I'm currently using a table structure to list out links such as "Mobile", "Help", "Terms", and so on. The issue I'm facing is that t ...

Implementing jQuery to showcase an element on the screen

I would like to express my gratitude to everyone who has helped me. Please forgive my poor English :) Can someone provide me with a jQuery script that can extract the name of the currently selected tab and display it in an h1 tag? Whenever the selected ta ...

I am having trouble properly positioning an icon next to its corresponding text within a menu item

I'm a newcomer to the world of HTML5 + CSS3 and I'm having trouble with aligning menus, text, and icons within the menu. Here's the issue: Each line of the menu consists of an icon and a text description. The problem is that they are too clo ...

The desktop version features a lighter font compared to the mobile version

One of my texts has the class .description {font-weight: lighter;font-size: 22px; } Strangely, the font-weight attribute seems to work on desktop but not on mobile devices. Why might this be happening? When I scale Chrome on my desktop to mobile size, ev ...

Enable synchronized scrolling and a fixed/sticky header with splitpanes feature

Sandbox.vue <template> <v-container fluid> <Splitpanes class="default-theme" style="height: 400px" > <Pane v-for="i in 2" :key="i" > & ...

Ensure the comparison of Datetime values with null or specific text in C#

How can I effectively compare a cell's DateTime value to either an empty or "None" string? If it is neither empty nor "None", I would like to add the parameter. Any assistance would be greatly appreciated. Thank you, but I am encountering an error st ...

Rearrange the following <div> to appear before the previous one on medium and small devices using Bootstrap

I'm working with this div from the Bootstrap framework: <div class="card-header py-md-0 py-lg-0 py-xl-0 pl-0 pr-0"> <div class="d-flex justify-content-between align-items-center"> <div class="h5 mb-0">Text text</div&g ...

Would you like to learn how to dynamically alter a button's color upon clicking it and revert it back to its original color upon clicking it again?

My Upvote button starts off transparent, but when I click on it, the background color changes to green. What I need is for the button to become transparent again when clicked a second time. I've attempted using the following code snippet: function ...

What is the best way to access all the elements within data.d?

I'm working with a server method that returns a collection of instances of a custom class. In my AJAX success callback function, I know that I can access these objects by using data.d. To get the first object, I would use data.d[0]. However, how can I ...

PHP and Bootstrap combine in this dynamic carousel featuring thumbnail navigation

Looking to create a dynamic bootstrap carousel with image thumbnails at the bottom? After exploring various code snippets and solutions, I stumbled upon this link. While the code worked, I found the thumbnails to be too small. Below are the functions I use ...

What is the best approach to define a *.css file in an ASP.NET UserControl?

I am dealing with a CSS file which includes all of the <style> tags used in my website. Is there a way I can connect this CSS file to my UserControl, allowing me to utilize the styles within the CssClass attributes for my child controls? ...