page layout web design
fixed
definite width
building floating layouts requires that you chose a method for containing the
floating elements
floats can cause
problems
modern web designs are built using the
CSS layout capabilities
fixed layout
a layout that remains constant despite the resizing of the browser in different screen resolutions and monitor sizes
flexible layout
a layout that shifts as the user resizes the window, wrapping text or adding white space as necessary to adapt to the size of the browser window
flexible layouts
adapt to size of the browser window the flexible layouts shift as the user resizes the window, wrapping text or adding white space as necessary
when designing float based layouts floats occasionally do not
appear exactly where you want them to appear the clear property can help you solve this problem
another benefit of using the wrapper division to contain your layout is the ability to
automatically center th layout horizontally in the browser
margin properties set to auto tell the browser to
automatically proportion the extra space in the browser window resulting in a centered layout
flexible
based on browser size and screen resolution
a web page design can contain
both floating and none floating ekemebts
if you use a no floating footer element in the normal flow with the clear property set to
both, the containing wrapper will extend beyond the footer property to contain all the content elements on the page
in the normal flow for inline elements
boxes are laid out horizontally beginning of at the top left of the containing block
in the normal flow for block-level elements
boxes are laid out vertically one after the other starting at the top of containing block each box horizontally fills the browser window
when floating elements extend beyond their continuing elements this results in
broken layout
flexible layouts offer the advantage of adapting to the users
browser size
media queries used to
build responsive web page designs that adapt to different device types
the box sizing property
can constrain the boxes width so they always fit within the containing element regardless of the border or padding size
a section can represent a
chapter or any other cohesive grouping of content on your web site
the <article> element is a
compete self contained composition in a document, oage, application, or site and that is in principle independently distributed or reusable e.g. in syndication
<article> and <section> elements can both be used to
contain content and they can be interchangeably nested within each other so articles csn contain sections and sections can contain articles
the <div> element has no special meaning use it only as a
container for block of content
you can nest content elements within
containers and create interesting content presentations
using box type properties you can create
containers that are any shape you need to contain and segregate sections of content
creating verticle columns helps you create
containing content and control the white space between and within columns
the body element is the
containing element for the content section of the webpage
use the <div> element to create
content sections in your web page dedigns
articles can contain any
content so you can add footers asides and other content elements to your articles
the aside element designed for
content that is tangentially related to the content around it this element floats right within the article element and it is offset from the border of the article element with a right margin a image element can also be floated this way
the borders and width
contribute to the width of each element
floats can
create multi column web pages fixed or flexible
when the header has no width it
defaults to the width of the browser window as any normal flow element would
the normal flow
determines the sequence of element display like in HTML
the elements within the body element are displayed
exactly in the order they appear in code from top to bottom
floats are designed to
extend outside of their containing eke!ents because the original concept of floating was to allow text to wrap around imsges
pixel measurements are favored by many designers when creating
fixed designs
within the wrapper you can chose whether to contain only
fixed elements, percentage elements, or a combination of the two because the outside of the page is fixed the design is more precise and content can flow down the page as necessary
many designers prefer
fixed layouts because they have more control over the finished design they can also build more complex layouts because they can be fairly site of consistent results
using floating elements you can
float elements within element within elements
elements don't appear next to each other unless they are
floated for have a display type of inline
text wraps around an image it is an advantage of
floats
the browser
flows the text into the inline boxes wrapping the text to the next line box as determined by the containing box or the browser window size
the wrapper element
holds all the pieces together and allows the page to be centered in the browser window
the <div> element is well known because it was used
in place of elements like <article> and <section> prior to HTML5 now that elements are specifically designer for semantic representation of page content <div> will not be used as often
the float property
let's you build columnar by floating content elements to fighter the right or left side of the browser window
element position can be affected by
margin or padding properties but the browser usually lays out elements top to bottom left to right until all elements are displayed
the space between boxes is determined by the
margin settings
you can control the compression and expansion of your content in a flexible layout by setting
minimum and maximum widths for the content
flexible layouts from a design viewpoint this can be less desirable because of the wide range of
monitor sizes and resolutions
if you have multiple columns at least one
needs to be no floating on the normal flow and positioned with margin properties
the <articke> and <section> elements are new to HTML5 and their general usage and acceptance had usage across the web development community is
not consistent
various margin and padding settings
offset the content from the sides of the container elements
a division element
often called a wrapper centers the web page within the browser window regardless of screen resolution
by default the browser normally displays elements on the page
one after the other, depending on whether the elements are block level or inline elements
HTML tables are not intended for
page layout they still exist but are not in favor
floats
position content elements on a web page and move them out of the normal flow of elements
fixed layouts
remain constant despite the resizing of the browser in different screen resolutions and monitor sizes
flexible layouts are the basis for
responsive layouts
automatic centering is a
simple use of the margin property
a article must
stand on its own and as a complete piece of content even if it is removed from it's web site
html5 has several sectioning elements
such as <header> and <footer> elements three sectioning elements <div> <article> and <section> are not as apparent and can be confusing
the <section> element represents a
tgermatically grouoedsection of the document and should contain a heading element to describe it's contents
960 pixel value for the width reflects
the base screen resolution of 1024x768
a wrapped division element contains
the content elements an dssts the fixed width for the layout
the inline boxes comprise
the lines of text within
normal flow
the sequence of element display in standard HTML from top to bottom and left to right until all elements that make up the web page have been displayed
floating elements must always havea specified width or they will expand to
the size of the browser window
the article element also contains a
themed group of content but it is different from <section> W3C describes
you can create a division element
to contain an entire web page often called a wrapper
float
to position an element by taking it out of the normal flow of the web page layout
some elements float
to the left or right of the other elements the page
in a standard HTML document the default positioning of elements is generally
top to bottom and left to right
column drops occur when the
total width of the columnar elements in a page layout exceeds the width of their containing element
to avoid guessing screen measurements
use a tool like screen ruler to easily measure pixels on your computer monitor
to fix the problem with floating elements two methods
using a normal flow element or using the clear property
normally you want to avoid using height on elements that contain
varying lengths of content as too much content will overflow a fixed height
in most cases other elements can represent post parts of a
web page so the <section> element might not be used much
the width of a box element includes the total of it's
width value plus any left or right padding, border, or margin
fixed layouts are normally contained by a
wrapper element that controls the page width and centers the page in the browser window
with a simple layout flexibke web sites resize gracefully but with more complex content and page designs
you may want to restrict your design with the min-width and max-width properties
when you float or position an element
you take it out of the normal flow so check results frequently
column drop
A layout error that occurs when the total width of the columnar elements in a page layout exceeds the width of their containing element
wrapper
A division element designed to contain an entire Web page.
