Before you proceed with creating your webpage layout, you should have spent some time actually thinking about the content and the design you want to use to present that content.
The content, after all, is what is going to draw viewers to your site. You need to decide on the best way to present that content so your viewers find your site and then stay to check it out.
While you can certainly design your layout on the computer, it might be easier to just use a paper and pencil and draw out a rough layout of how to best present you content.
Your layout will probably include a masthead or banner at the top, perhaps a top navigation menu, a content area that may include multiple columns, and footer at the bottom of the page.
In the past, you may have used tables to achieve this look. Tables created an assortment of boxes that were used to create rows and columns. Now web designers use <div>s to form the boxes and CSS to place those boxes on the page.
For this tutorial, we will be using <div> </div> tags to create the various boxes and style rules to place those boxes as a two column layout with masthead, top navigation bar, left sidebar, main content area, and footer. Each of the boxes or divs will hold the content for your page.
The <div> tag defines a division or section in a page and makes it easy to manage, style, and manipulate those divisions or sections. Browsers usually place a line break before and after the div element. Use the <div> tag to group block-elements to format them with styles.
The layout shown above shows the use of div tags. Each div tag <div></div> creates a box. Using various style rules, the boxes will be positioned to create the layout used in this tutorial. Once you learn the basics of working with div’s you can create one, two, or three columned layouts. Read more on the HTML <div> tag.
What are block-level elements?
You can work in 'Code View' or 'Design View,' but I would recommend working in 'Split View' so that you see the results of your actions. Before we start, make sure your 'Toolbox panel' is available. Click Panels > Toolbox. The default location is on the right-hand side of your editing window. You can move it wherever you like. View Workspace Screenshot.
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 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 3 and 4 offers two additional ways to preview your pages — 'SuperPreview' or the 'Snapshot' panel. To use the 'Snapshot' panel, click Panels > Snapshot. To view your pages 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.
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, type or select the following:
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 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' panel click 'New Style.' In the New Style dialog box, type or select the following:
View Screenshot of 'Quick Tag Selector'
View Screenshot of 'New Style' Panel
Your style sheet now contains the following:
#container { width: 80%; padding: 10px; margin: 10px auto 10px auto; background-color: #FFFFFF; }
and your html code contains
<div id="container"> </div>.
Your style sheet now contains the following:
#masthead { background-color: #54B431; background-image: url ('clover-bg.jpg'); background-repeat: no-repeat; background-position: right center; height: 170px; }
and your html code contains
<div id="container">
<div id="masthead"> </div>
</div>
Your style sheet now contains the following:
#top-nav { height: 50px; border-top: solid medium #006600; border-bottom: solid medium #006600; background-color: #FFFFFF; }
and your html code contains
<div id="container">
<div id="masthead"> </div>
<div id="top-nav"> </div>
</div>
Our sample page will consist of two columns — one on the left for additional navigation or messages and the main column for content. We will float the one column to the left and place the main content area by applying a left margin.
Your style sheet now contains the following:
#left-nav { margin: 20px 0px 10px 0px; width: 180px; float: left; border: thin dashed #006600; }
Your style sheet now contains the following:
#main-content { margin: 20px 10px 10px 200px; background-color: #CCFFCC; }
and your html code contains
<div id="container">
<div id="masthead"> </div>
<div id="top-nav"> </div>
<div id="left-nav"> </div>
<div id="main-content"> </div>
</div>
Your style sheet now contains the following:
and your html code contains
<div id="container">
<div id="masthead"> </div>
<div id="top-nav"> </div>
<div id="left-nav"> </div>
<div id="main-content"> </div>
<div id="footer"> </div>
</div>
View screenshot of basic layout with <div>'s identified.
Your page currently contains these meta tags in the head section:
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" >
<title>Sample Site</title>
You will need to add additional meta tags to the head section of your page.
<meta name="keywords" content=" " >
<meta name="description" content=" " >
<meta content="en-us" http-equiv="Content-Language" >
<meta content="General" name="rating" >
<meta content="Copyright © 2008-2009, You Name or Business All Rights Reserved" name="copyright" >
Right click in Design View on your page > Page Properties.
OR you can copy and paste the tags into your document. Read more on Basic Meta Tags.
You have now completed the basic layout of your page. Additional style rules will need to be added for your menus, your heading tags, and floats for your images. You can test how your page layout will look by adding some filler content. Some of the style rules will need to be modified. E.g., adding padding to the main content area and the left navigation container.
NEXT STEP: Adding Navigation to the Layout
This will be done in two parts. We will add a horizontal top menu, then a left.side navigation menu. You may choose to use one or the other or both.
Copyright © 2009 Pat Geary of Expression Web Tutorials and Templates, All Rights Reserved
Revised May 2012
Expression Web 4.0 Tutorials 2nd Edition from Install to Publish, a FREE EBook by Pat Geary.
Expression Web has a group on Facebook. If you are a FB user, come join us.
Disclosure: This is an affiliate link, which means that if you visit Bluehost.com through this link and purchase this product, I’ll get a commission.
April 2007 - April 2013
Privacy Policy | Migrating from FrontPage to Expression Web
Microsoft® and Expression Web® are registered trademarks of Microsoft® Corporation.
Site Design & Maintenance : Expression Web Tutorials & Templates