Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6609915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:46:28+00:00 2026-05-25T19:46:28+00:00

CSS isn’t being applied in aspx page. It works when the css is defined

  • 0

CSS isn’t being applied in aspx page. It works when the css is defined in the same page (href references a.classname) but when it is put into a stylesheet it is not applied. When element is inspected, Chrome says user agent stylesheet is being applied.

It says that a:-webkit-any-link is being applied to hyperlinks (user agent stylesheet)

Any ideas why this isn’t working?

I reference the class for the hyperlink using:

<div class="summaryitem"><a ID="hl" runat="server" href="" class="someclassname">Hyperlink CSS should be applied to this</a>

Here’s the CSS I’m using:

a.someclassname:link { 
    font-weight: bold;   
    color: #555;
    text-decoration:none;
    }
a.someclassname:visited { 
    font-weight: bold;   
    color: #555;
    text-decoration:none;
    }
a.someclassname:hover { 
    font-weight: bold;   
    color: #555;
    text-decoration:none;
    }
a.someclassname:active { 
    font-weight: bold;   
    color: #555;
    text-decoration:none;
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:46:29+00:00Added an answer on May 25, 2026 at 7:46 pm

    If you’re in a partial view, just be sure the parent view includes the CSS ref.

    EDIT: wow got a similar problem a few minutes ago. I’ve solved testing my view with Chrome and using the network auditing feature (at the page hit F12, click on Network and then reload your page). Should tell you at least if your CSS is correctly sent to the browser. (my problem was I wasn’t referencing the correct CSS).

    EDIT-2:
    I usually refer to CSS via:

    <link href="@Url.Content("~/Content/css/fg.menu.css")" media="screen" rel="stylesheet" type="text/css" />
    

    But I’m using MVC with Razor views, I’ve noticed that putting CSS out of the Content folder can be nasty on ASP.NET.

    HTH

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Isn't there a CSS way of having the page to get a border around
Css "hover" selector applys a temporary style to an element, but it isn't definitive:
Sadly, CSS outline isn't supported in IE7, so i'm stuck using border. But adding
Why isn't jQuery being applied to dynamically created elements? Here is jsFiddle: http://jsfiddle.net/Y5RuC/19/ When
The CSS rules visibility:hidden and display:none both result in the element not being visible.
<head> <title>Water Bureau</title> <link rel=shortcut icon href=/favicon.ico /> <link rel=stylesheet href=/css/main.css type=text/css media=screen title=Main
This is not a CSS problem. The HTML isn't there. I need the menu,
I keep getting the error saying that the application.css isn't compiled. I tried: rake
HTML and CSS are showing their age. SASS generates CSS (because CSS isn't clean
I have some pretty basic HTML/CSS that isn't working as I expect. Basically I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.