Sunteți pe pagina 1din 16

ADVANCED WEB DESIGN

CSS3
responsive
WEBSITE
LAYOUT
SESSION 2
CSS website layouts
static, liquid, responsive
static design
design using pixels to set
the size of the elements

ADVANTAGE:

maximum control over how the page appears


DISADVANTAGE:

page won’t fit perfectly for a lot of visitors


LIQUID design
flows with the size of the
visitor’s browser’s window

ADVANTAGE:

control over how much it expands or contracts


DISADVANTAGE:

expansions and contractions aren’t perfect


RESPONSIVE design
most advanced and
flexible layout style
combines both liquid
layout and CSS3
media queries
uses only HTML and CSS
desktop
tablet

PHONE
setting the viewport
a <meta> viewport element gives
the browser instructions on how
to control the page's dimensions
and scaling.
SOME RULES TO FOLLOW

Do NOT use large fixed


width elements
For example, if an image is displayed at a width
wider than the viewport it can cause the
viewport to scroll horizontally. Remember to
adjust this content to fit within the width of the
viewport.
SOME RULES TO FOLLOW

Do NOT let the content rely


on a particular viewport
width to render well
Since screen dimensions and width in CSS
pixels vary widely between devices, content
should not rely on a particular viewport width to
render well.
SOME RULES TO FOLLOW

Use CSS media queries to


apply different styling for
small and large screens
Setting large absolute CSS widths for page elements will
cause the element to be too wide for the viewport on a
smaller device. Instead, consider using relative width
values, such as width: 100%. Also, be careful of using
large absolute positioning values. It may cause the
element to fall outside the viewport on small devices.
MEDIA QUERY
uses the @media rule to include a
block of CSS properties only if a
certain condition is true.
ADDING BREAKPOINTS
add a breakpoint where certain
parts of the design will behave
differently on each side of the
breakpoint.
fa2
responsive
LAYOUT
20 MINUTES
Page layout with CSS is
probably the trickiest
part of web design

S-ar putea să vă placă și