HTML and CSS Reference
In-Depth Information
Using an id in the lounge
Our guarantee paragraph really should have an id since it's
intended to be used just once in the page. While we should have
designed it that way from the beginning, making the change is
going to be quite simple.
Step one: Change the class attribute to an id in your “lounge.html” file
Just change the class
attribute to an id.
<p id="guarantee">
Our guarantee: at the lounge, we're committed to providing
you, our guest, with an exceptional experience every time you
visit. Whether you're just stopping by to check in on email
over an elixir, or are here for an out-of-the-ordinary dinner,
you'll find our knowledgeable service staff pay attention to every
detail. If you're not fully satisfied, have a Blueberry Bliss Elixir
on us.
</p>
Step two: Change the “.guarantee” class selector in “lounge.css” to an id selector
Just change the . to a
# in the selector.
#guarantee {
line-height: 1.9em;
font-style: italic;
font-family: Georgia, "Times New Roman", Times, serif;
color: #444444;
border-color: white;
border-width: 1px;
border-style: dashed;
background-color: #a7cece;
padding: 25px;
padding-left: 80px;
margin: 30px;
margin-right: 250px;
background-image: url(images/background.gif);
background-repeat: no-repeat;
background-position: top left;
}
 
Search WWH ::




Custom Search