Go To Definition for CSS

Tips Search

If you like the tips then you'll love the book!

Order your copy today:
http://www.amazon.com/gp/product/0735649928

Go To Definition for CSS

  • Comments 3

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:

image

 

 

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

image

 

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.

Page 1 of 1 (3 items)
Leave a Comment
  • Please add 8 and 5 and type the answer here:
  • Post