CIS195 Web Authoring 1: HTML

More Page Layout Using CSS

Weeks 1-5 Weeks 6-10
1. Intro to HTML 6. Layout with CSS
2. More HTML, file paths 7. HTML Tables
3. Site structure and navigation 8. HTML Forms
4. Formatting with CSS, Midterm 9. Multimedia, Final
5. Project Propposal, Midtern 10. Project Completion, Final

[Topics by Week for the Ten-Week Term]

Contents

[TOC]

Q and A

Positioning

The position property specifies the positioning method used for an element:

After setting a position property, a distance can be set. Elements are positioned using the one of the following properties:

This example moves the image 100 pixels to the right and 50 pixels down:

img {
  position: relative;
  left: 100px;
  top: 50px;
}

Overflow Content

The overflow property specifies what should happen if content overflows an element’s content area. The values are:

Example:

div {
  overflow: scroll;
}

Stacking Objects in a Page

The z-index property specifies the stack order of an element. The greater the stack order, the closer an is element is to the front.

This property only works for elements that have their position set.

There are two possible values:

Example:

img {
  position: fixed;
  left: 10px;
  top: 10px;
  z-index: -1;
}

Example

References


Creative Commons License Web Authoring Lecture Notes, written by Brian Bird in 2018 and revised by Brian Bird in 2020, are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.