Effective CSS style applied to an element

How to debug which CSS styles have been applied to an element and which styles are overrided ?

Thx
AXISHKAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RobOwner (Aidellio)Commented:
use the browsers developer tools.  e.g. for chrome it is Ctrl+Shift+i or F12

More information here:
https://developer.chrome.com/devtools


I often right click on an element on the page and click "inspect".  This also brings up the devtools, specifically targeting that element.  That's important as you can see on the CSS/Styles panel exactly what CSS has been applied AND what has been overridden.

Clipboard01.jpg
0
AXISHKAuthor Commented:
What is the user agent style in the inspect window ... the one that I can't  see in my coding....

Thx
0
RobOwner (Aidellio)Commented:
You can find the user-agent on the network tab.  Just reload the page and look at any of the requests made by the browser. Is that what you are after?

Clipboard02.jpg
0
AXISHKAuthor Commented:
I mean the one shown in the attached file.. Is it the one that applied by default browser setting ?

Thx
CSS.png
0
RobOwner (Aidellio)Commented:
Ah I see... for your nav element, yes the "user agent" is what the browser does by default.  In this case, just displays as "block"

Then above that I can see you're applying a custom style (can't see the actual file) to the nav element.

At the top of that window, click "computed" to see all the styles that affect that element.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.