• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Pseudo-Classes and Pseudo-Ele... > left, right and first Pseudo-Classes

7.5. left, right and first Pseudo-Classes

The left, right and first pseudo-classes are all used with the @page media type. They are used to stipulate specific styles for the left, right and initial page of a Web document that is formatted for print. The following code snippet shows them all in use:

<style>
@page :first {margin-left: 1.5in;
margin-right: 1.5in;}
@page :left {margin-left: 1.5in;
margin-right: 1in;}
@page :right {margin-left: 1in;
margin-right: 1.5in;}
</style>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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