Skip to main content

Exercise 14

  • Create a new folder with the name ex_14
  • Create the following files
  • Download the pattern.jpg file
/ex_14
|-- index.html
|-- pattern.jpg

index14.html

<!DOCTYPE html>
<html>
<head>
<title>Learning CSS</title>
</head>
<body>
<div class="main">
<h1>Lorem ipsum dolor</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Officiis
corrupti fuga obcaecati magnam doloremque, consectetur et assumenda
suscipit laboriosam sed possimus id voluptate commodi illum doloribus.
Necessitatibus mollitia non atque.
</p>
<p>
Nobis, reprehenderit temporibus sequi vitae corporis officiis sapiente
nemo ratione corrupti alias totam inventore culpa quis unde repellendus
quo deserunt laboriosam quam natus enim aut omnis? Ea doloribus pariatur
temporibus.
</p>
<p>
Quae eveniet quaerat, distinctio culpa ipsa aut alias quisquam, nemo,
consectetur facere vero reiciendis quia voluptates eius cumque ipsam
iste at pariatur. Sunt accusantium magni eveniet ea, eum consequatur
deserunt!
</p>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Officiis
corrupti fuga obcaecati magnam doloremque, consectetur et assumenda
suscipit laboriosam sed possimus id voluptate commodi illum doloribus.
Necessitatibus mollitia non atque.
</p>
<p>
Nobis, reprehenderit temporibus sequi vitae corporis officiis sapiente
nemo ratione corrupti alias totam inventore culpa quis unde repellendus
quo deserunt laboriosam quam natus enim aut omnis? Ea doloribus pariatur
temporibus.
</p>
<p>
Quae eveniet quaerat, distinctio culpa ipsa aut alias quisquam, nemo,
consectetur facere vero reiciendis quia voluptates eius cumque ipsam
iste at pariatur. Sunt accusantium magni eveniet ea, eum consequatur
deserunt!
</p>
</div>
</body>
</html>
  • After applying all styles the document must look like this:

Ex 14

  • Add a style element
  • Select the body element and apply the following style:
    • Use Arial, Helvetica, sans-serif as font family
    • Use the pattern.jpg as background image
    • The image must repet in x and y axis
    • Top and bottom margin must be 20px, left and right set them to 0
    • Remove padding from all sides
  • Select the elements with the main class and apply the following style:
    • Background color must be white
    • The element must be 960px wide
    • Remove top and bottom margin
    • Center the element using margin auto
    • Add 20px padding to all sides
    • Add 10px of border radius
    • Use the following box shadow values 0 10px 6px -6px #777