2

Is there any way to find the default value of the attributes that we have not set in our any corresponding file like html, css and javascript. Actually it also creates problem when the attribute is not taking our defined value but the default value. for example: if i am setting font family to myriadPro but due to unavailability of myriadPro font on the computer it is taking Times new roman. Is there any way to alert this TimesNewRoman value just for the confirmation.

gurvk
  • 253
  • 1
  • 13
  • http://stackoverflow.com/questions/6867254/browsers-default-css-for-html-elements – himanshu Sep 06 '14 at 12:06
  • http://www.w3.org/TR/CSS2/sample.html – himanshu Sep 06 '14 at 12:08
  • @himanshu IIUC the question is a bit different, it is not if there is a default CSS applied, it's how to detect if and when a given element is receiving directives from those CSS instead than directives from the page CSS, like for example because a font is missing. – Simone Gianni Sep 06 '14 at 12:13
  • @himanshu i think you have interpreted the question incorrectly. – gurvk Sep 08 '14 at 07:47
  • yes i think i now understand but i have no answer for that question – himanshu Sep 08 '14 at 08:03

2 Answers2

3

If any style is not defined manually, then by default it inherits the style of its parent. You can also check the results in your developer tools to see the style of its parent.

gurvk
  • 253
  • 1
  • 13
ravisingh
  • 272
  • 1
  • 9
1

Try using the chrome developer tools and look at the 'computed' value. This is the value that Chrome is actually applying. Default values will appear, but be greyed.

johntrandall
  • 194
  • 6