1 Reply Latest reply on Mar 7, 2014 11:04 AM by David_Powers

    Enforce css stylesheet on all dependent pages

    peterchogudo

      How do you enforce changes on the stylesheet on all dependent pages. My sightseeing page does not totally relect the changes made to the style sheet main.css

        • 1. Re: Enforce css stylesheet on all dependent pages
          David_Powers Adobe Community Professional (Moderator)

          Styles are applied automatically to elements by the selectors used in the style sheet. If styles aren't being applied as you expected, there could be a number of reasons. One common reason for styles not being applied is spelling IDs or class names incorrectly. They are case-sensitive. Another reason is that the style is being overridden by another.

           

          CSS stands for "cascading style sheets". Styles "cascade" down, and are applied cumulatively. If two conflicting styles apply to the same element, the basic rule is that the style lower down the style sheet overrides the earlier one. However, some selectors are more powerful (have higher "specificity") than others. An ID takes precedence over a class, and a class takes precedence over a tag (or type) selector.

           

          It's a complex subject that can't be fully covered in a forum post. To learn more about how style rules work, take a look at this tutorial I wrote a few years ago: http://www.adobe.com/devnet/dreamweaver/articles/css-selectors-pt1.html. It was written for Dreamweaver CS5.5, but is still relevant because it concentrates on the CSS code rather than specific parts of the Dreamweaver UI.