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

Lesson 12. Creating a Photo Gallery > Styling the Paragraph Element

Styling the Paragraph Element

Most browsers render standard <p> elements with margins of 1em above and below. You can override these margins using margin: 0.

Now the paragraph will sit under the image, but it is still sitting against the edge of its container. You will need to give it some space using padding. In this case, apply 20px of padding to the right, 30px below, and 10px to the left.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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