Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Q&A

Q. When I create a new CSS layout, all I get is a series of empty boxes. Why is that?

A. The prepackaged CSS layouts in Expression Web 4 are little more than empty divs with some basic positioning in them. The intention is to give the user a clean slate to work with, but in reality there is little difference between using the prepackaged layouts and creating the layouts from scratch. The one advantage of using the layouts is that all the divs have proper names and positions, so you don’t have to keep tabs on absolutely everything.

Q. When I added the new layout.css style sheet, I noticed that there are now many different versions of the styles, such as body and p. Isn’t that a problem?

A. The new style sheet includes the CSS reset, which has all the available selectors listed and set to 0. Further down in the style sheet and in the kippleStyles.css style sheet, the same selectors are styled a second and sometimes even a third time. This isn’t a problem as much as a deliberate exploitation of the cascade: You reset the styles to 0 at the start and then create new styles that apply fresh styles further down the line. This piling of styles is a good illustration of how the cascade works and is something you should take note of for future reference: The farther down in the style sheet a style is, the more weight or importance it has.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial