51
Expression Web 4.0 Tutorials from Install to Publish and More
Page 51
As we create the layout for our page, we will also be adding the style rules to our external style
sheet. NOTE: When you select 'Preview in Browser,' the last browser you used will be what you
you
see. You should view your pages as you develop them in BOTH Internet Explorer and Firefox
and at more than one resolution. Not everyone is going to view you page with their browser
open fullscreen or have the latest and greatest in monitors.
Expression Web 4 offers two additional ways to preview your pages — 'SuperPreview' or the
the
'Snapshot' panel. To use the 'Snapshot' panel, click Panels > Snapshot. To view your pages with
with
'SuperPreview,' select File > Display in SuperPreview OR Press Shift + F12.
If it is not already open, open the page you created earlier in Expression Web. File > Open OR
Press Ctrl + O.
Style the <body> tag
The body element defines the document’s body. To style the <body> tag, create a new style.
From the 'Manage Styles' or 'Apply Styles' panel click 'New Style.' In the New Style dialog box,
box,
type or select the following:
1.
Selector: Choose body from the dropdown list.
2.
Define in: select ‘Existing style sheet’ from the dropdown. Select the style sheet.
3.
Font: Set the font-family and color.
4.
Background: Set your page background color. You may also choose to use a seamless
background as the page background.
5.
Box: Set the margins and padding to 0px, which remove the default margins web browsers apply
y
to a web page.
6.
Click OK. Save your page and view in your browser.
7.
At the same time, copy and paste the following to your style sheet: body img { border: 0px; text-
decoration: none; }, which will keep any images that are hyperlinks from having the ugly blue
border.
You can also use the ‘CSS Properties’ task panel for creating styles.
Add the Container
The first <div> we will add will be for the container that will "hold" all of the other <div>’s or
elements of our page. Style rules will be added as we add the <div> tags.
Step 1: With your page open in 'Split View,' drag the <div> from the 'Toolbox' panel and drop it
op it
on your open page. You will see that
<div></div>
has been added to your page.
Step 2: Using the 'Quick Tag Selector,' click <div>. From the 'Manage Styles' or 'Apply Styles'
yles'
panel click 'New Style.' In the New Style dialog box, type or select the following: