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

Lesson 13. Styling a Block Quote > Styling the <blockquote> Element

Styling the <blockquote> Element

Unstyled <blockquote> elements are indented on the left and right sides. You can change this default behavior by resetting the margins. In this case, you will set the top and bottom margins to 1em and the left and right margins to 0. This can be achieved using a shorthand margin declaration—margin: 1em 0.

Next, you can apply a border to the <blockquote> to separate it from other content on the page. You can use a 1-pixel-wide border set to light gray, border: 1px solid #ddd.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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