Go To Definition for CSS

Tips Search

Go To Definition for CSS

  • Comments 4

Keyboard:  F12
Command:  Edit.GoToDefinition
Versions:  2008,2010
Published:  12/24/2010
Code:  vstipFind0021


Work with SharePoint?  Then make sure to check out the new SharePoint Developer Team Blog!


For those that are familiar with using "Go To Definition" in your code may not be aware that you can use the same technique on for class attributes to go to your CSS definition.  It couldn't be easier.  Just put your cursor inside the class name:




Then press F12 (or RIGHT CLICK and choose "Go To Definition").  It will instantly take you to the CSS definition and highlight it:



Now you can make edits, etc.. as you see fit.

  • I've never known this to work! I just get an error dialog saying "Could not find CSS class selector '<selector>'"

  • have you reference your css link into your markup file? (in default.aspx for example)

  • Hey Mark,

    Quachnguyen asked a good question.  Without the reference this won't work.  I double-checked this recently for the book and it does work.  I would try just creating a very simple project with a CSS reference and a basic CSS file with only one entry.  See if that shows it working.

  • If you use a style sheet that is in a master page or MVC SysLayout it does not work. Someone at Microsoft needs to re-visit this functionality and make it compatible with mater pages and SysLayout.

Page 1 of 1 (4 items)
Leave a Comment
  • Please add 7 and 7 and type the answer here:
  • Post