Jump to content

Say I have a paragraph tag, and style it red with external, internal and inline CSS. What is the result?

a: Definition in external overrides the others
b: Definition in internal overrides the others

c: Definition in inline overrides the others

d: Styling fails, and paragraph recieves standard color (black).

Main:  1650 v2   @ 4,6GHz   -   X79 Deluxe                -   GTX 1080 @ 2000MHz   -   24GB DDR3 @ 2400MHz / CL10

Side:   i7-4790K @ 4,5GHz   -   Maximus 7 Hero        -   GTX 1070 @ 2114MHz    -  16GB DDR3 @ 2666MHz / CL12

 

HWBOT

Link to comment
https://linustechtips.com/topic/865798-css-question/
Share on other sites

Link to post
Share on other sites

Hi, 
assuming there is no javascript involved, and that you're declaring your external stylesheet after the internal style tags in your head, and that you declare your classes pointing your external stylesheet before your inlines styles in your tag. Your browser will first apply the internal style declared in your head, then the external css, and finally the inlines styles, unless you put the classes after the inline styles.
It all depends on the order you write everything... the browser will always try to apply what's been declared the latest. 
Hope it helped ! 
Otherwise you can still put your code on https://jsfiddle.net/ and I'll try to help out

Link to comment
https://linustechtips.com/topic/865798-css-question/#findComment-10752346
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×