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

Q&A

Q1:The <div> and <span> tags are described as implementing CSS layers. I thought that CSS, or Cascading Style Sheets, had to do with text. Am I right?
A1: The CSS standard does define many attributes for manipulating text. But it also defines “box elements,” which are what layers are. This might make more sense to you after you have completed the next hour on Cascading Style Sheets. You'll see the different attributes of box elements, or layers, that you will be able to set up in a style and how powerful that capability is.
Q2:Why would I want to use layers in my Web pages?
A2: You may decide not to use layers and may end up using other ways, tables for instance, to position content on your Web pages. But if you'd like to have some content overlapping or sitting on top of other content, you'll need to use layers, setting the layer z-index to a value higher than the underlying content's z-index. Alternatively, if you'd like to hide an image or text on the screen and then show it later using the Show-Hide Layer behavior (see Hour 16), you'll of course need to use layers. In Hour 18, you'll learn how to animate layers to move around the Web page.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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