How to lay out a web page with CSS

Similar documents
How to lay out a web page with CSS

How to lay out a web page with CSS

Dear Candidate, Thank you, Adobe Education

Overview of the Adobe Dreamweaver CS5 workspace

How to set up a local root folder and site structure

COMSC-031 Web Site Development- Part 2

How to create and edit a CSS rule

ITEC185. Introduction to Digital Media

ADOBE 9A Adobe Dreamweaver CS4 ACE.

Page Layout Using Tables

CS Multimedia and Communications. Lab 06: Webpage Tables and Image Links (Website Design part 3 of 3)

< building websites with dreamweaver mx >

Sign in and join ADC Newsletters Feedback. Creating your first website Part 2: Creating the page layout

Table Basics. The structure of an table

Figure 1 Forms category in the Insert panel. You set up a form by inserting it and configuring options through the Properties panel.

Advanced Dreamweaver CS6

Figure 1 Properties panel, HTML mode

Getting Started with CSS Sculptor 3

Chapter 1 Introduction to Dreamweaver CS3 1. About Dreamweaver CS3 Interface...4. Creating New Webpages...10

Taking Fireworks Template and Applying it to Dreamweaver

Dreamweaver Basics. Planning your website Organize site structure Plan site design & navigation Gather your assets

Dreamweaver Basics Outline

Dreamweaver Tutorials Working with Tables

Using Dreamweaver CC. Logo. 4 Creating a Template. Page Heading. Page content in this area. About Us Gallery Ordering Contact Us Links

For detailed instructions, click the links below. To ask questions, request features, or report problems, visit feedback.photoshop.com.

Adobe Dreamweaver CS6 Digital Classroom

How to deploy for multiple screens

Introduction to Dreamweaver CS3

ORB Education Quality Teaching Resources

Dreamweaver CS6. Level 3. Topics Working with Text, List, and tables Working with Images

[PACKT] HTML5, CSS3, and jquery. Dreamweaver CS5.5 Mobile. and Web Development with

Discuss web browsers. Define HTML terms

Dreamweaver CS3 Concepts and Techniques

Microsoft Excel Chapter 2. Formulas, Functions, and Formatting

A Dreamweaver Tutorial. Contents Page

Using Adobe Contribute 4 A guide for new website authors

Dreamweaver CS4: Layout Guide. Převzato z

[AVWSQ-ADWCS6]: WSQ ICDL Adobe Dreamweaver CS6

KillTest *KIJGT 3WCNKV[ $GVVGT 5GTXKEG Q&A NZZV ]]] QORRZKYZ IUS =K ULLKX LXKK [VJGZK YKX\OIK LUX UTK _KGX

Styles, Style Sheets, the Box Model and Liquid Layout

Using Dreamweaver CS6

ICT IGCSE Practical Revision Presentation Web Authoring

Dreamweaver MX Overview. Maintaining a Web Site

Dreamweaver CS4. Introduction. References :

Dazzle the Web with Dynamic Dreamweaver, Part II

USER GUIDE. MADCAP FLARE 2017 r3. QR Codes

COMSC-031 Web Site Development- Part 2. Part-Time Instructor: Joenil Mistal

Creating your first website Part 4: Formatting your page with CSS

Dreamweaver CS3 Lab 2

IT153 Midterm Study Guide

Dreamweaver CS 5.5. University Information Technology Services. Training, Outreach, Learning Technologies, and Video Production

Client Interview. Interview Topics. Goals and Target Audience. Activity 3.1 Worksheet. Client Name:

Getting Started with Eric Meyer's CSS Sculptor 1.0

INFS 2150 Introduction to Web Development

INFS 2150 Introduction to Web Development

Layout with Layers and CSS

To illustrate how to set TAG styles the <body> and <h1> tags (for the BODY and the HEADING 1 styles) will be adjusted.

Lesson 5 Introduction to Cascading Style Sheets

FrontPage 2000 Tutorial -- Advanced

Dreamweaver CS6. Table of Contents. Setting up a site in Dreamweaver! 2. Templates! 3. Using a Template! 3. Save the template! 4. Views!

Create a Web Page with Spry Navigation Bar. March 30, 2010

Dreamweaver Domain 5: Organizing Content by Using Dreamweaver CS5

MS Office Word Tabs & Tables Manual. Catraining.co.uk Tel:

With Dreamweaver CS4, Adobe has radically

How to use the ruler, grid, guides, and the Align panel

ADOBE Dreamweaver CS3 Basics

Adobe Dreamweaver CC 17 Tutorial

ADOBE DREAMWEAVER CS4 BASICS

Dreamweaver 8. Project 5. Templates and Style Sheets

Working with Images and Multimedia

Dreamweaver Tutorial #2

Adding Frames. In This Chapter

Using Microsoft Word. Working With Objects

InDesign CC 2014 Intermediate Skills

Adobe Dreamweaver CS4

Dreamweaver CS5 Lab 2

Title and Modify Page Properties

Microsoft Office Training Skills 2010

Microsoft Word 2011 Tutorial

Introduction. Inserting and Modifying Tables. Word 2010 Working with Tables. To Insert a Blank Table: Page 1

Unit 8. Lesson 8.1. Microsoft FrontPage. Introduction. Microsoft FrontPage-1. Microsoft FrontPage

Creating Web Pages with SeaMonkey Composer

ver Wfl Adobe lif Sams Teach Yourself Betsy Bruce Robyn Ness SAMS 800 East 96th Street, Indianapolis, Indiana, USA WlM John Ray ^lg^

How to create a prototype

CROSSFADE ANIMATION with AFTEREFFECTS

Creating a Navigation Bar with a Rollover Effect

Correcting Grammar as You Type

Overview of Adobe Fireworks

CSS for Page Layout Robert K. Moniot 1

Web Publishing Basics II

Flash Image Enhancer Manual DMXzone.com Flash Image Enhancer Manual

Creating consistent content pages

Fish Eye Menu DMXzone.com Fish Eye Menu Manual

What is the Box Model?

Tutorial 4. Activities. Code o Editor: Expression Web o Focus : Base Layout, navigation with folders, external stylesheets, Open up Expression Web

Page Layout. 4.1 Styling Page Sections 4.2 Introduction to Layout 4.3 Floating Elements 4.4 Sizing and Positioning

Dreamweaver 101. Here s the desktop icon for Dreamweaver CS5: Click it open. From the top menu options, choose Site and New Site

ENGL 323: Writing for New Media Repurposing Content for the Web Part Two

Before you begin, make sure you have the images for these exercises saved in the location where you intend to create the Nuklear Family Website.

Correcting Grammar as You Type. 1. Right-click the text marked with the blue, wavy underline. 2. Click the desired option on the shortcut menu.

Transcription:

How to lay out a web page with CSS A CSS page layout uses the Cascading Style Sheets format, rather than traditional HTML tables or frames, to organize the content on a web page. The basic building block of the CSS layout is the div tag an HTML tag that in most cases acts as a container for text, images, and other page elements. When you create a CSS layout, you place div tags on the page, add content to them, and position them in various places. Unlike table cells, which are restricted to existing somewhere within the rows and columns of a table, div tags can appear anywhere on a web page. You can position div tags absolutely (by specifying x and y coordinates), or relatively (by specifying their distance from other page elements). You can also position div tags by specifying floats, paddings, and margins the preferred method by today s web standards. Creating CSS layouts from scratch can be difficult because there are so many ways to do it. You can create a simple two-column CSS layout by setting floats, margins, paddings, and other CSS properties in a nearly infinite number of combinations. Additionally, the problem of cross-browser rendering causes certain CSS layouts to display properly in some browsers and improperly in others. Dreamweaver makes it easy for you to build pages with CSS layouts by providing 16 pre-designed layouts that work across different browsers. Using the pre-designed CSS layouts is the easiest way to create a page with a CSS layout, but you can also create CSS layouts by using absolutely-positioned elements (AP elements). An AP element in Dreamweaver is an HTML page element specifically, a div tag or any other tag that has an absolute position assigned to it (Figure 1). The limitation of Dreamweaver AP elements, however, is that since they are absolutely positioned, their positions never adjust on the page in relation to the size of the browser window. Once you become more experienced you will be able to create page layouts by inserting div tags manually and applying CSS positioning styles to them. Figure 1 AP elements in the Dreamweaver Document window Inserting an AP div tag Start this activity by creating a new, blank page and inserting an AP div tag. AP elements can contain text, images, or any other content that you can place in the body of an HTML document. 2012 Adobe Systems Incorporated How to lay out a web page with CSS 1

Adobe Dreamweaver To insert an AP div tag: 1. Start Dreamweaver. 2. Select File > New. The New Document dialog box opens (Figure 2). 3. With the Blank Page category selected, click HTML under Page Type and <none> under Layout. 4. Click Create. A new untitled HTML document opens. 5. Save the new page. The new file is added to the Files panel. 6. Select the Layout category in the Insert panel and confirm the Standard mode button is selected (Figure 3) 7. Click the Draw AP Div button. The mouse pointer changes to a cross when you move it over the Document window. 8. To create the div that will define an area of your page, drag a rectangle in the Dreamweaver document. 9. Click the border of the div to select it. Handles appear along the border (Figure 4) and the div properties appear in the Properties panel. Figure 2 New Document dialog box Figure 3 Insert panel, Layout category Figure 4 Div inserted and selected 2 How to lay out a web page with CSS 2012 Adobe Systems Incorporated

10. Make sure the Properties panel is open (Figure 5). It is docked at the bottom of the screen. If the Properties panel is not open, select Window > Properties. 11. Click in the CCS-P Element ID box and enter a name for the div. Choose a unique name that will help you remember the div s contents, such as header or navigation. Note: CSS-P is a commonly accepted abbreviation for CSS Positioning. 12. Click the Bg Color box and select a color in the color picker. The div changes to the selected color. 13. Click once outside the new div to deselect it. A thin black line appears around the div. This line does not appear in a browser. If you do not see the line, select View > Visual Aids > CSS Layout Outlines. 14. Continue adding divs for all the sections on your page. You can place divs directly alongside one another (Figure 6). 15. Open the AP Elements panel (Window > AP Elements). You ll see that Dreamweaver has added the new divs to the list of AP Elements (Figure 7). Note: Select Prevent Overlaps to constrain the positions of AP elements when they are created, moved, and resized, so that they don t overlap. 16. Save your page. CSS-P Element ID box Figure 5 Properties panel Figure 6 Multiple divs on page Figure 7 AP Elements panel Resizing divs You can resize an individual div or simultaneously resize multiple divs to make them the same width and height. Note: If the Prevent Overlaps option is selected in the AP Elements panel, you will not be able to move a div so that it overlaps another div. 2012 Adobe Systems Incorporated How to lay out a web page with CSS 3

Adobe Dreamweaver To resize a div: 1. Select a div by clicking its border or by clicking the div s name in the AP Elements panel. 2. Do one of the following to resize the div: To resize by dragging, drag any of the div s resize handles (Figure 8). To resize one pixel at a time, hold down Control (Windows) or Option (Mac OS) while pressing an arrow key. Note: The arrow keys move the right and bottom borders of the div; you can t resize the top and left borders with this technique. In the Properties panel, type values for width (W) and height (H). Figure 8 Resize by dragging Div resize handle Moving divs You can move divs in Design view in much the same way you move objects in most basic graphics applications. Note: If the Prevent Overlaps option is selected in the AP Elements panel, you will not be able to move a div so that it overlaps another div. To move a div: 1. Select one or more divs. 2. Do one of the following: To move by dragging, drag the div s selection handle (Figure 9). To move one pixel at a time, use the arrow keys. Selection handle Figure 9 Moving a div Adding content to divs You can add images, text, and other content (such as Flash movies) to your divs just as you would elsewhere in a web page. To add content to a div: 1. To insert an image in a div, click in the div and select Insert > Image. Note: Make sure the div is sized large enough to hold the image or other content. If the div is sized smaller than the image, the div may not display correctly in all browsers. 4 How to lay out a web page with CSS 2012 Adobe Systems Incorporated

2. In the Select Image Source dialog box, locate and select an image to insert (such as a page banner). Then click OK (Windows) or Open (Mac OS). The image appears in the div (Figure 10). 3. To format the image in the div, select the image and select formatting elements in the Properties panel. 4. To add text to a div, click in the div and type text or paste text copied from another document. Figure 10 Div with image added Viewing div tags by using Live view You can use a feature called Inspect mode in Live view to view the code generated by adding the div tags. To view div tags using by using Inspect mode in Live view: 1. Click the Live button in the Control panel (Figure 11). Live view is enabled. This means that the page appears as it will in a web browser. 2. Click the Live button again to deactivate Live view. 3. Click the Split button. Code and Design view (Split view) view is enabled. This lets you see the code alongside the design display. 4. Click the Live button again to activate Live Code view. 5. In the Design view, click on a div s selection handle, or an image placed within a div and observe that the div tag is highlighted in the Code view (Figure 11). Live button Highlighted tag Div Figure 11 Split Code/Live view 2012 Adobe Systems Incorporated How to lay out a web page with CSS 5