- post a link to your homework on the comments section of this blog post!
- An overview of Visual Formatting Model--- THINK INSIDE THE BOX!
- Box
Model: The box model defines how elements are displayed. Every
CSS element forms a "box" composed of these components:
- Content - The actual content of the element such as text or
an image. When using the width property, you are defining the
width of the content. - Padding - Define the space around the content using the padding-top,
padding-right, padding-bottom, padding-left properties. - Border - Define a stroke around the content and padding using
the border-top, border-right, border-bottom, border-left properties. - Margin - Define the space around the combined content, padding
and border using the margin-top, margin-right, margin-bottom,
margin-left properties.
- Content - The actual content of the element such as text or
- IE/Win
Box Model Quirks
- Diagram:
Comparison between W3C and IE/Win box models.
- Diagram:
- Margin
Collapsing: When two or more vertical margins meet they will collapse
to form a single margin with the height of the larger of the two margins.
The vertical margins of nested elements will also collapse if they
are not separated by padding or borders. - Boxes: Block vs. Inline vs. Anonymous
- Block elements are elements such as <div>, <p>,
or headers <h1>…<h6>. When their content is
displayed the next element within the document structure will
be positioned below it, not next to it. The vertical distance
between boxes is calculated by the boxes vertical margins. - more on the box: Inline elements are elements such as <a>. <strong>,
<em> or <span>. Their content is displayed horizontally,
within lines. Horizontal spacing between inline elements can be
adjusted using padding, borders and margins. Vertical spacing
has no affect on inline elements. - Inline
Elements and Padding - Anonymous
Boxes: A block or inline box that has not been explicitly
defined as an element. You cannot style anonymous block or line
boxes since there is nothing to connect to. (see link example)
- Block elements are elements such as <div>, <p>,
- Box
- CSS Positioning
- Static or Normal
Flow: Normal flow is the default scheme used for positioning.
Block boxes flow vertically starting at the top of their containing
block with each placed directly below the preceding one. Inline boxes
flow horizontally from left to right. - Relative:
Relatively positioned elements are positioned within the normal flow
and then moved using x and y coordinates. Elements that come after
a relatively-positioned element behave as if the relatively-positioned
element was still in its ‘normal flow’ position - leaving
a gap for it. - Absolute:
An absolute positioned box is moved out of the normal flow entirely
using x and y coordinates. Absolutely positioned boxes can overlap
other elements on the page. Control the stacking order with the Z-index.
The higher the Z-index, the higher the box is in the stack. Elements
that come before or after an absolutely positioned box ignore it completely.
an example of absolutely positioned DIVs- Fixed:
Fixed positioned elements are moved out of the normal flow entirely
- relative to the viewport. This means that they don't move if
the page is scrolled. Win/IE5 and Win/IE6 do not support this
positioning method at all.
- Fixed:
- Floating
: A floated box is taken out of the flow and shifted to the left or
right until it touches the outer edge of its containing box or another
floating box. Block-boxes in the normal flow behave as if the floated
box wasn't there. Paragraphs of text (line boxes) next to a floated
box can flow down the right side of a left-floated box and down the
left side of a right-floated box. More good info on floats
- Clearing:
Elements following a floated element will wrap around the floated
element. To stop this from happening the "clear" property
can be applied to "clear" a vertical space for all elements
following the float.
- Clearing:
- Static or Normal
- Layout
- Horizontally Centered
- Liquid: Dimensions are set using percentages, allowing layouts to
scale to fit the browser window. On some monitors layouts can feel
stretched and line heights can get too long or too short.
- Three-Column
using floats - Two-Column using
absolute-P
- Three-Column
- Elastic: Dimensions are determined by the width of elements using
ems. This is relative to the font size, not the browser width.
- Elastic-liquid hybrid: Widths are set in ems and maximum widths
are set as percentages.
- Other Sample
CSS Layouts
- Horizontally Centered
- PHASE ONE: Site Definition
- Outline of the development process; what is going to happen at each
step; everyone's jobs (both the clients' and yours); and a timeline.
- A few useful Articles:
- Outline of the development process; what is going to happen at each
- lets discuss the positioning Exercises
CLIENT WORK
- Get Your Clients to fill out the Client survey- its due in class next week.
- do all 4 of the DARPA CSS POSITIONING EXERCISES
- Choose one, and make your Bill of Rights page liquid, elastic, or elastic liquid hybrid.
TECHNICAL PREPARATION
- Read Chapter 2 from the book CSS Mastery
13 comments:
http://classes.jayvanburen.com/students/yinsham/homeworkpage.html
http://classes.jayvanburen.com/students/shadman_samad/bill_of_rights/bill_of_rights.html
http://classes.jayvanburen.com/students/Raymondng/homework.html
http://www.mscherrer.com/bill/melissa2.html
melissa
Bill Of Rights
Nicole F.
http://classes.jayvanburen.com/students/nicolefwebwork/nfusterbillofrights.html
http://classes.jayvanburen.com/students/felix/homework.html
http://classes.jayvanburen.com/students/ybaryshevahw.html
Post a Comment