Finding a CSS Class Definition

seagull A couple of weeks ago I pointed out that you could easily find the definition of a property, method, variable, or class by right-clicking the item and selecting, “Go To Definition” from the context menu.

You can also use this feature in your ASPX files to find the definition of CSS classes.  However, you cannot use this to find definitions of rules.  And if the class is not defined, you will not see the menu option and you’ll get a green squiggly under the class and the tooltip will tell you that the class is not defined.

Other places talking about CSS and Visual Studio

Dynamically applying CSS based on browser’s resolution « Yanesh … – Create a new CSS file and name it 800.css. This CSS file will have styles for the 800×600 resolution. For this example I have chosen the background color as green and position of navigation bar on right hand side. …

Tips & Tricks for ASP.NET, IIS, and Visual Web Developer : Tip #28 … – … the same selector weighting wins; Visual studio (in my test) loaded the first file. – If an HTML element has many classes (space delimited, e.g. class=”class1 class2″, class2 cannot be found if you use .class1.class2 in your css …

Visual Studio 2008 CSS Support – Not Quite : b# – One of the often-touted new features of VS 2008 is the improved CSS support. I like having intellisense for CSS, sure, but I dont’ want to have a warning for classes that don’t exist…. like this: That green squiggly indicates a …

Tryangled Dev » Blog Archive » Visual Web Developer Enhancements – Visual Studio now provides tools that make it easy to work with cascading style sheets (CSS). You can design the layout and style content in Design view by using new UI tools such as the CSS Properties window. …

 

Other post in Did you know

Related Post

  • Easily Find Classes, Methods, and VariablesEasily Find Classes, Methods, and Variables There is a bit of a "trick" that I use routinely in Visual Studio to help me find the definition of Classes, Methods, and Variables in my solution regardless. This "trick" works in both CSharp ...
  • Dynamically Change class Attribute From ASP.NETDynamically Change class Attribute From ASP.NET I recently received a question from another programmer I know who's been using PHP prior to ASP.NET that made me think harder about a problem we've all had in ASP.NET.  The basic problem is t...
  • DotNetNuke Modules – Creating Base ModulesDotNetNuke Modules – Creating Base Modules Now that we have DotNetNuke installed into Visual Studio we can go ahead and create our first modules. Actually, creating the modules is pretty simple. But it is even easier to do it wrong, which...
  • Two CSS Files When Using ASP.NET Themes?Two CSS Files When Using ASP.NET Themes? One of the projects that I'm working on is for a company targeting the Canadian marketplace.  These sites have to be written in both French and English for that country, which means there is a fair...
  • Why CSS ID selectors are Evil in ASP.NET Web FormsWhy CSS ID selectors are Evil in ASP.NET Web Forms Anyone familiar with CSS knows that class selectors are generally reserved for controlling how an element looks (font, color, size, etc) and id selectors are generally reserved for where the elemen...