
The JavaScript file can be served either from your site or from the Google Code content distribution network (CDN). The following instructions describe both methods.
</head> tag.<head> of the page:<script type="text/javascript" src="javascript/html5.js"></script>
This applies the local version of the script.
If you want to use the Google Code CDN, amend the src attribute like this:
src="http://html5shiv.googlecode.com/svn/trunk/html5.js"
<script> tag in the following Internet Explorer conditional comment:<!--[if lte IE 8]>
<script src="javascript/html5.js"></script>
<![endif]-->
All basic rules will be defined in desktop.css, so use this setting all the time until you start creating the alternative rules for different resolutions in Part 3.
In the Type category, set Font-family to Trebuchet MS, Arial, Helvetica, sans-serif, and color to black #000 .
In the Background category, set Background-color to #66B034.
In the Box category, set Margin and Padding to 0, and leave the Same for all check boxes selected.
Click OK to create the style definition. The background turns a lime green, and the font is changed.
container <div> . This uses an ID, so set Selector Type in the New CSS Rule dialog box to ID, and Selector Name to #container. Click OK.Set Margin Top and Bottom to 0, and Right and Left to auto.
Click OK. The page's content is centered in a fixed width.
<header#logo> in the Tag selector at the bottom of the Document window.In the Box category, set Width to 100% and Height to 138px.
When you click OK, the Citrus Café logo is inserted as a background image at the top of the page, but the <h1> and <h2> headings sit on top of it.
The text headings are no longer visible in a visual browser, but they will still be detected by search engines and screen readers for the blind.
The top section of index.html should now look like Figure 2.

Let's begin by creating the basic menu before adding flourishes of CSS3 goodness.
<nav> element, and Design view seems to share the same opinion, but Figure 3 shows what happens if you do.
However, if you turn on Live view, the content below the menu moves up to obscure it. Let's fix that by creating a rule for the maincontent <div> .
The <div> uses an ID, so set Selector Type to ID in the New CSS Rule dialog box. Set Selector Name to #maincontent.
There's still some overlap in Live view, but that will be eliminated when the menu items are floated.
ul {
padding:0;
margin:0;
}
nav ul {
list-style: none;
margin-bottom: 15px;
font-weight: bold;
font-size:20px;
}
nav ul li {
float: left;
}
nav ul a {
display: block;
width:140px;
padding: 10px;
text-align:center;
text-decoration: none;
color: #fff;
border: 1px solid #618A37;
margin: 5px 0px;
}


border-radius from the list. This adds a tiny icon that looks like a plus sign and a triangle in the field alongside (circled in Figure 6).
border-radius settings.
Make sure the “Same for all” checkbox is selected, and click the up
arrow in the Top Left number stepper. With each click, the number
increases by 1. At the same time, Live view applies rounded corners to
the menu buttons, as Figure 7 shows.
Right-click the new listing for border-radius in the Properties pane of the CSS Styles panel, and select Go to Code. This opens desktop.css in Split view with the insertion point at the beginning of the line that defines the border-radius property.
Select that line, as shown in Figure 8, and copy it to your clipboard.

border-radius property twice inside the nav ul a rule, so you have three copies of the same line.border-radius property by prefixing it with -moz- like this:-moz-border-radius: 8px;
-webkit-. The nav ul a style rule should look like this:nav ul a {
display: block;
width:140px;
padding: 10px;
text-align:center;
text-decoration: none;
color: #fff;
border: 1px solid #618A37;
margin: 5px 0px;
-moz-border-radius:8px;
-webkit-border-radius:8px;
border-radius:8px;
}
Why do you need three versions of the same style definition?
It's because browsers are introducing implementations of CSS3 properties
incrementally, often on an experimental basis. Prefixing the property
with -moz- for Firefox and -webkit- for Safari
and Chrome ensures that the style rules are recognized by those
browsers, but are ignored by others. The latest versions of all three
browsers now recognize the official border-radius property, but you need
the browser-specific versions to support older versions.
Internet Explorer and Opera also have their own prefixes: -ms- and -o- respectively. However, they’re not required for border-radius.
It's important the the official CSS3 property is listed last to ensure that the official version overrides the browser-specific version in browsers that support it. Because the browser-specific versions are sometimes experimental, you want to ensure that the stable, official version is applied to your styles wherever possible.

-webkit-box-shadow (the properties are in alphabetical order).
This changes the format Dreamweaver uses to specify color values, allowing you to set its alpha transparency.
1px 1px 3px rgba(0,0,0,1)
1px 1px 3px rgba(0,0,0,0.3)

-moz-box-shadow: rgba(0,0,0,0.3) 1px 1px 3px;
-webkit-box-shadow: rgba(0,0,0,0.3) 1px 1px 3px;
box-shadow: rgba(0,0,0,0.3) 1px 1px 3px;
nav ul a style rule is still selected.
text-shadow: 1px 1px 1px rgba(0,0,0,0.8)
nav ul a:link, nav ul a:visited {
background: rgba(255,255,255,0.2);
}
nav ul a:hover, nav ul a:active, nav ul a:focus {
background: rgba(255,255,255,0.4);
}
nav ul li:hover {
margin-top:-10px;
}
This moves each menu button 10 pixels up when you hover over it.
nav ul li {
float: left;
-webkit-transition-duration:.5s;
-webkit-transition-property:margin-top;
-webkit-transition-timing-function:ease-in-out;
-o-transition-duration:.5s;
-o-transition-property:margin-top;
-o-transition-timing-function:ease-in-out;
-moz-transition-duration:.5s;
-moz-transition-property:margin-top;
-moz-transition-timing-function:ease-in-out;
transition-duration:.5s;
transition-property:margin-top;
transition-timing-function:ease-in-out;
}
Note: All the main browsers, except Internet Explorer (including version 9), now support the transition properties.
The mission statement is in an <article> element that has an ID, so you can use an ID selector to style it.
#vision {
font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;
font-size:32px;
font-weight:bold;
background-image:url(../images/lrg_hero.jpg);
background-repeat:no-repeat;
}
You now need to work out how much padding to put around the text, and deduct it from the width and height of the image. After experimenting, I decided to put 40px on the left and 370px on the right, a total of 410px. Deducting that from the 819px of the image leaves 409px for the width. I also put 60px of padding on the top, but none on the bottom. That leaves 237px for the height. So, although the background is 819 x 297, the height and width of the content is 409 x 237.
The background shows through the padding around the content. You need some space below the background image, so add a bottom margin of 20px. Also adjust the vertical spacing of the text by setting line-height to 1.2. The amended style rule should look like this:
#vision {
font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;
font-size:32px;
font-weight:bold;
line-height:1.2;
background-image:url(../images/lrg_hero.jpg);
background-repeat:no-repeat;
width: 409px;
height:237px;
padding:60px 370px 0 40px;
margin-bottom:20px;
}
.pod {
background: #fff;
padding: 10px;
width: 244px;
float:left;
margin-right: 13px;
}
This gives the pods a white background with 10px of padding all round. The width of each pod is set to 244px, but the 10px padding on either side makes the overall width 264px. Adding 13px of margin to the right of each pod creates an overall width of 831px. However, the final 13px margin can be ignored because the background shows through margins. So, the overall width of the three pods floated side by side will be 818px, just one pixel different from the overall width of the background image for the mission statement.
The 13px right margin on the final pod doesn't need to be removed because the space available within the container <div> is 840px.
Click <section> in the Tag selector to select the entire pod, and apply the pod class from the Class pop-up menu in the Property inspector in HTML mode.
<section> elements.The first two pods float alongside each other, but the "News" pod is pushed down the page, because the images protrude from the first two (see Figure 13).

.podContent {
margin-top:10px;
width: 244px;
height:181px;
overflow:hidden;
}
<figure> in the Tag selector.The Class pop-up menu in the Property inspector displays pod because the value is inherited. Reset the value of the pop-up to podContent. The image is now constrained inside the pod.
<article> in the Tag selector. Apply the podContent class to it.The three pods now line up, as shown in Figure 14.

<section.pod> in the Tag selector.Type news in the ID text box in the Property inspector, and press Enter/Return to confirm the change.
#news .podContent {
margin-top:12px;
overflow:auto;
}
#news .podContent p {
margin-top: 5px;
margin-bottom: 5px;
margin-left:6px;
font-size:15px;
}
These rules override the overflow property in the other two pods, and adjust the formatting of the paragraphs.
.pod h1 {
background: #CCC;
color: #000;
padding:5px;
background-image:url(../images/icon_chevron.png);
background-repeat:no-repeat;
background-position:95%;
font-size:16px;
font-weight:normal;
margin: 0 0 10px 0;
}
a.block {
text-decoration:none;
display:block;
}
<time> elements. Set the font-weight property to bold and give each element a uniform width like this:time {
font-weight:bold;
display:inline-block;
width:2.5em;
}
Setting the display property to inline-block applies the width to the
The styles for the footer are very straightforward, so don't need any explanation.
footer {
padding: 10px 0;
clear:both;
color: #fff;
}
footer p {
margin:0 0 5px 0;
}
#phone {
font-weight:bold;
color: #000;
}
#facebookTwitter {
float:right;
margin-right:25px;
}
<p> in the Tag selector.In Live view, your page should now look like Figure 15.

That completes Part 2 of this three-part tutorial series. In Part 3, you'll use CSS media queries to optimize the page for devices with lower screen resolutions, such as mobile phones and tablets.