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

Test driving the width

Next, save the CSS and then reload the “lounge.html” file. You’ll see the elixirs section get much skinnier, thanks to the width you gave it. The width of the content in the <div> is now exactly 200 pixels. There’s also some interesting behavior you should check out...

image with no caption

Brain Power

Can you resize your browser window to less than the width of the elixirs <div>? Some browsers won’t let you go that narrow; others will. If you can go narrower, compare the text in the elixirs <div> with the rest of the text on the page. The other paragraphs resize themselves no matter how wide or narrow you go, but the elixirs <div> never gets narrower or wider than 200 pixels.

image with no caption

The width property specifies the width for the content area only.


  

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


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint