The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Cascading , what does it mean ?

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #162011
    Hesham Ghoniem


    i want to know what is the meaning of Cascading in CSS

    please give me simple definition as my English is not very good


    Cascading in CSS is very important and allows disambiguation of selectors. (it makes it clear to the browser which style to apply to which thing.)

    From the link Paulie_D posted (my emphasis):

    The cascade combines the importance, origin, specificity, and source order of the applicable style declarations to determine exactly—and without conflict—which declaration should be applied to any given element.

    It’s not very simple to explain because understanding Cascading in CSS (how it works and why it’s important) requires an understanding of each of the bolded items above.

    It is also important to understand that certain style rules are inherited in CSS meaning that even if they aren’t explicitly declared in a stylesheet, a child element may inherit them from its parent’s styles.

    In addition, a browser must know how to deal with (potentially) conflicting style declarations that exist in separate stylesheets. So if you have a page with ‘base.css’ and ‘style.css’ linked up IN THAT ORDER then you know that any rules you write in ‘style.css’ will override those in ‘base.css’ (assuming those rules have the same specificity and importance.)

    I hope the explanation was simple enough to understand and helps you further your understanding of this key concept.


    Hesham Ghoniem

    Thanks , Paulie_D
    Thanks , dyr

    i understand it

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.