1

When i rightclick in Chrome dev tools on an element and try to copy the css path of something i get something like this:

body > div > div > div > div > div.span3 > aside > div:nth-child(1)

For (re)writing CSS this would be very usefull if it would only show the class or id names instead of the DOM element or the # of the child element.

Does anyone know of a plugin or something which gives you more control over this feature?

Jackques
  • 97
  • 1
  • 8
  • If the element has an ID, then you will in fact obtain just the ID of the element, given the nature of IDs. The problem is that "Copy CSS path" constructs a selector that *only* the selected element will match, something that a class selector alone cannot accomplish (but an ID should, theoretically). – BoltClock Jun 11 '14 at 09:11
  • Hmm.. i'm actually not that much of an expert on the developer tools.. but in order to structure my css accordingly it's important that I use relative paths so i select just that element that i need to select. I taught that the 'CSS path' feature would be of great help of obtaining the relative path, because these paths can become quite long in big websites. – Jackques Jun 11 '14 at 09:41
  • possible duplicate of [Google Chrome copy CSS Path in Developer Tools](http://stackoverflow.com/questions/15369895/google-chrome-copy-css-path-in-developer-tools) – sergdenisov May 07 '15 at 23:20

0 Answers0